nicholas-leonard / dp

A deep learning library for streamlining research and development using the Torch7 distribution.
Other
343 stars 139 forks source link

I trying to load my data and convert it to torch7 format? #142

Closed SalemAmeen closed 9 years ago

SalemAmeen commented 9 years ago

I am trying to run (notmnist.lua) then, after that I will load my data using this function but I kept receiving this error. Could you please tell where is the error or my mistake? and how I could make change to load my data using this code?

th -i notmnist.lua /usr/local/bin/luajit: /usr/local/share/lua/5.1/torch/init.lua:65: while creating metatable dp.NotMnist: bad argument #1 (dp is an invalid module name) stack traceback: [C]: in function 'newmetatable' /usr/local/share/lua/5.1/torch/init.lua:65: in function 'class' notmnist.lua:8: in main chunk [C]: in function 'dofile' /usr/local/lib/luarocks/rocks/trepl/scm-1/bin/th:131: in main chunk [C]: at 0x010fd450f0

nicholas-leonard commented 9 years ago

You need to require dp first.

th
> require 'dp'
> ds = dp.NotMnist()
SalemAmeen commented 9 years ago

@nicholas-leonard , many thanks Graet, it works. Could you please tell me can I use this file to load images saved in my desk?

nicholas-leonard commented 9 years ago

If they are organized on disk the same way as the NotMnist dataset, then yes. All images must have the same size. You might need to change dp.NotMnist._image_size to have the same size as your images.

SalemAmeen commented 9 years ago

Many thanks for answering I organize my data as same as Notmnist dataset, can you please tell me if I can change the size my data to colour images dp.NotMnist._image_size = 3x64x64

Regards,

nicholas-leonard commented 9 years ago
dp.NotMnist._image_size = {3,64,64}

3 channels for RGB color, yup. 64 height, 64 width.

Nicholas Léonard 917-741-7570

On Wed, Jul 15, 2015 at 1:45 AM, Salem notifications@github.com wrote:

Many thanks for answering I organize my data as same as Notmnist dataset, can you please tell me if I can change the size my data to colour images dp.NotMnist._image_size = 3x64x64

Regards,

Reply to this email directly or view it on GitHub https://github.com/nicholas-leonard/dp/issues/142#issuecomment-121497287 .

SalemAmeen commented 9 years ago

Many thanks