Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to load images and labels in Torch for a Convolutional Neural Network

I'm new to Torch and would like to load some images from two directories (one for each label). I'm trying to build a convolutional neural network that will classify images as belonging to one class or another (i.e. a binary classifier) but I am unsure how load images, label those images and get the data into the correct format. I'm using the following tutorial, however the training data is loaded in a different way which I am not familiar with.

http://code.madbits.com/wiki/doku.php?id=tutorial_supervised

Hope someone can help me get started and point me in the right direction.

Many thanks in advance.

like image 854
Adam Avatar asked Sep 27 '22 07:09

Adam


1 Answers

Check this link The data.lua file in that is very simple to understand. They have used torch tensors, and the code is self explanatory. I had achieved a clear understanding of loading the data, post reading this link; hope it helps you too.

like image 191
Nikhil Sharma Avatar answered Oct 07 '22 20:10

Nikhil Sharma