{
  "id": 7210,
  "title": "Using R",
  "url": "/competitions/cifar-10/discussion/7210",
  "author_name": "Ryan Jones",
  "post_date": "2014-02-26T15:55:58.470000",
  "votes": 1,
  "comment_count": 8,
  "views": 5582,
  "content": "<p>Has anybody successfully trained a model that got good results using R? &nbsp;So far, a number of the methods seem to be focused on python implementations.</p>\n<p>What data processing techniques/ packages have been useful so far?</p>",
  "messages": [
    {
      "id": 219682,
      "postDate": "2017-09-09T04:01:14.573Z",
      "content": "<p>The team at RStudio (mainly JJ Allaire, AFAICT) have released a <a href=\"https://keras.rstudio.com/\">package</a> called Keras, which interfaces to three backends: TensorFlow, CNTK and Theano.  I've been using that on some toy examples and it seems to work well. You'll need a working installation of one or both of the backends, and an NVidia GPU, ideally at GTX 1060 with 6GB RAM or better. It runs on slower GPUs fine (I have a GTX 750ti with 2GB) and CPUs, which is OK for small models. But most real deep learning researchers recommend at least a 1060 these days.</p>\n\n<p>HTH,</p>\n\n<p>John</p>",
      "rawMarkdown": "The team at RStudio (mainly JJ Allaire, AFAICT) have released a [package][1] called Keras, which interfaces to three backends: TensorFlow, CNTK and Theano.  I've been using that on some toy examples and it seems to work well. You'll need a working installation of one or both of the backends, and an NVidia GPU, ideally at GTX 1060 with 6GB RAM or better. It runs on slower GPUs fine (I have a GTX 750ti with 2GB) and CPUs, which is OK for small models. But most real deep learning researchers recommend at least a 1060 these days.\n\nHTH,\n\nJohn\n  [1]: https://keras.rstudio.com/",
      "votes": 1,
      "replies": [
        {
          "id": 329303,
          "postDate": "2018-05-16T07:30:46.350Z",
          "content": "<p>Will it work with AMD GPU?</p>",
          "rawMarkdown": "Will it work with AMD GPU?"
        },
        {
          "id": 353986,
          "postDate": "2018-07-08T12:53:02.090Z",
          "content": "<p>No.</p>",
          "rawMarkdown": "No."
        }
      ]
    },
    {
      "id": 51316,
      "postDate": "2014-07-29T18:26:07.107Z",
      "content": "<p>This toy example shows how to access pixel data in R:</p>\n<p><code>library('png')<br>download.file('http://i.stack.imgur.com/hakvE.png', 'sample.png')<br>img = readPNG('sample.png')<br>pix.top.left = img[1,1,] # row 1, column 1<br>pix.bottom.left = img[3,1,] # row 3, column 1<br>pix.top.right = img[1,3,] # row 1, column 3</code></p>\n<p>Once you have the matrix 'img' for your pics you can embark on whatever data reduction seems reasonable. &nbsp;I don't think it's going to be slow, particularly.</p>",
      "votes": 1
    },
    {
      "id": 39516,
      "postDate": "2014-02-26T15:55:58.470Z",
      "content": "<p>Has anybody successfully trained a model that got good results using R? &nbsp;So far, a number of the methods seem to be focused on python implementations.</p>\n<p>What data processing techniques/ packages have been useful so far?</p>",
      "votes": 1
    },
    {
      "id": 51802,
      "postDate": "2014-08-09T16:54:59.977Z",
      "content": "<p>You can read convert images to single csv and read into R.</p>\n<p>Christopher Beckham posted his sample python script on&nbsp;following forum article&nbsp;:</p>\n<p>https://www.kaggle.com/c/cifar-10/forums/t/8274/extracting-pixel-data-from-images/50915#post50915</p>\n\n<p>Hope this help.</p>"
    },
    {
      "id": 40207,
      "postDate": "2014-03-12T10:59:02.100Z",
      "content": "<p>R is going to be damn slow on images. Atleast that's what I infer from other competitions. Python has a deep learning module. Should be a good place to learn that.</p>"
    },
    {
      "id": 136754,
      "postDate": "2016-09-24T20:02:07.143Z",
      "rawMarkdown": "",
      "votes": 2,
      "isDeleted": true,
      "replies": [
        {
          "id": 253352,
          "postDate": "2017-12-04T20:40:32.823Z",
          "content": "<p>This was supremely helpful, thanks! </p>",
          "rawMarkdown": "This was supremely helpful, thanks! "
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 219682,
      "author_name": "John Williams",
      "author_url": "",
      "post_date": "2017-09-09T04:01:14.573000",
      "content": "<p>The team at RStudio (mainly JJ Allaire, AFAICT) have released a <a href=\"https://keras.rstudio.com/\">package</a> called Keras, which interfaces to three backends: TensorFlow, CNTK and Theano.  I've been using that on some toy examples and it seems to work well. You'll need a working installation of one or both of the backends, and an NVidia GPU, ideally at GTX 1060 with 6GB RAM or better. It runs on slower GPUs fine (I have a GTX 750ti with 2GB) and CPUs, which is OK for small models. But most real deep learning researchers recommend at least a 1060 these days.</p>\n\n<p>HTH,</p>\n\n<p>John</p>",
      "votes": 1,
      "replies": [
        {
          "id": 329303,
          "author_name": "RudraFCB",
          "author_url": "",
          "post_date": "2018-05-16T07:30:46.350000",
          "content": "<p>Will it work with AMD GPU?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 353986,
          "author_name": "Steve Devney",
          "author_url": "",
          "post_date": "2018-07-08T12:53:02.090000",
          "content": "<p>No.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 51316,
      "author_name": "Jay Moore",
      "author_url": "",
      "post_date": "2014-07-29T18:26:07.107000",
      "content": "<p>This toy example shows how to access pixel data in R:</p>\n<p><code>library('png')<br>download.file('http://i.stack.imgur.com/hakvE.png', 'sample.png')<br>img = readPNG('sample.png')<br>pix.top.left = img[1,1,] # row 1, column 1<br>pix.bottom.left = img[3,1,] # row 3, column 1<br>pix.top.right = img[1,3,] # row 1, column 3</code></p>\n<p>Once you have the matrix 'img' for your pics you can embark on whatever data reduction seems reasonable. &nbsp;I don't think it's going to be slow, particularly.</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 51802,
      "author_name": "Yong Hee Park",
      "author_url": "",
      "post_date": "2014-08-09T16:54:59.977000",
      "content": "<p>You can read convert images to single csv and read into R.</p>\n<p>Christopher Beckham posted his sample python script on&nbsp;following forum article&nbsp;:</p>\n<p>https://www.kaggle.com/c/cifar-10/forums/t/8274/extracting-pixel-data-from-images/50915#post50915</p>\n\n<p>Hope this help.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 40207,
      "author_name": "Bargava",
      "author_url": "",
      "post_date": "2014-03-12T10:59:02.100000",
      "content": "<p>R is going to be damn slow on images. Atleast that's what I infer from other competitions. Python has a deep learning module. Should be a good place to learn that.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 136754,
      "author_name": "",
      "author_url": "",
      "post_date": "2016-09-24T20:02:07.143000",
      "content": "",
      "votes": 2,
      "replies": [
        {
          "id": 253352,
          "author_name": "Emmanuel Perry",
          "author_url": "",
          "post_date": "2017-12-04T20:40:32.823000",
          "content": "<p>This was supremely helpful, thanks! </p>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "219682": "The team at RStudio (mainly JJ Allaire, AFAICT) have released a [package][1] called Keras, which interfaces to three backends: TensorFlow, CNTK and Theano.  I've been using that on some toy examples and it seems to work well. You'll need a working installation of one or both of the backends, and an NVidia GPU, ideally at GTX 1060 with 6GB RAM or better. It runs on slower GPUs fine (I have a GTX 750ti with 2GB) and CPUs, which is OK for small models. But most real deep learning researchers recommend at least a 1060 these days.\n\nHTH,\n\nJohn\n  [1]: https://keras.rstudio.com/",
    "51316": "",
    "39516": "",
    "51802": "",
    "40207": "",
    "136754": ""
  }
}