milakov / nnForge

Convolutional neural networks C++ framework with CPU and GPU (CUDA) backends
http://nnforge.org
177 stars 44 forks source link

nnForge train/test with imagenet dataset #23

Closed anshumang closed 9 years ago

anshumang commented 9 years ago

@milakov I am curious about the effort required to do this. Sorry for creating an issue as this is a mailing-list question.

milakov commented 9 years ago

It is doable. Actually, I have a project for training and validating model on ImageNet data. One would need to have all original training data at hand (150GB).

I am currently doing major refactoring for the nnForge framework, the plan is to publish ImageNet app when I finish this refactoring (might happen in ~2 months, cannot say for sure). But if you feel you ned it earlier I might consider publishing it for the current not yet refactored framework.

anshumang commented 9 years ago

I have downloaded the train and val data. Yes, it would be great if you could publish it soon.

milakov commented 9 years ago

Try it.

anshumang commented 9 years ago

It seems I need to rearrange the .JPEG files under train/ directory. I have all the .JPEG files extracted to the same parent directory. Instead, I should have nXXXX_YYYY.JPEG under directory nXXXX/ and so on. Keep you posted.

anshumang commented 9 years ago

Also, will I need a shell script to do what examples/imagenet/misc_files/generate_cls_class_info.m does?

milakov commented 9 years ago

You need Matlab or Octave, and also DevKit from ImageNet

anshumang commented 9 years ago

@milakov Is the meta_clsloc.mat supposed to be in the repo? I couldn't find it.

milakov commented 9 years ago

No, it is part of DevKit available at the same location you downloaded training and validating data.

anshumang commented 9 years ago

Got it, thanks !

anshumang commented 9 years ago

It works, thanks a ton :+1:

anshumang commented 9 years ago

Can this run without cudnn? I am looking to instrument some of the long running kernels but for that I need the kernel source.

milakov commented 9 years ago

Unfortunately no, cuDNN is a must.

anshumang commented 9 years ago

Is it possible to adapt v1.1.11 with imagenet application in current master to use the nnforge convolution kernels?

milakov commented 9 years ago

If you need to replace conv layer only then you can do it with head of the master branch. Modifiy files nnforge/cuda/convolution_layer_testing_schema.cpp and nnforge/cuda/convolution_layer_updater_schema.cpp, replace 2 with 0 in "else if (input_configuration_specific.dimension_sizes.size() <= 2)"

anshumang commented 9 years ago

Getting the following exception with the above changes -

Exception caught: No CUDA updater for the convolutional layer of 2 dimensions for Kepler and above architectures

anshumang commented 9 years ago

:+1:

By adding the lines, case 2: res = layer_updater_cuda_smart_ptr(new convolution_layer_updater_cuda_kepler<2>()); break; in nnforge/cuda/convolution_layer_updater_schema_helper_cuda_kepler.cu, the above exception is fixed.

milakov commented 9 years ago

Super!