pdnn icon indicating copy to clipboard operation
pdnn copied to clipboard

ImportError: No module named models.dnn

Open Document-Data-Analyst opened this issue 8 years ago • 2 comments

I have downloaded successfully all dependencies required to run pdnn. But when i run the following command from terminal

python pdnn/cmds/run_DNN.py --train-data "train.pickle.gz,partition=600m,random=true" \

it shows an import error message.

As I am new to this learning environment. I seek your help for the purpose to rectify this error.

Regards,

Document-Data-Analyst avatar Oct 11 '16 09:10 Document-Data-Analyst

I have the same problem when I try to run the examples/mnist/run.sh the dnn.training.log just show:

Traceback (most recent call last): File "C:/pdnn-master/cmds/run_DNN.py", line 27, in from models.dnn import DNN ImportError: No module named models.dnn

a00achild1 avatar Oct 13 '16 03:10 a00achild1

I have the same error in Ubuntu16, The pythonpath was not defined correctly. I created a demo file as the run scripts in the examples folder, everything works.

 pdnndir=<your path>/pdnn  # pointer to PDNN
 device=cuda*  # the device to be used. set it to "cpu" if you don't have GPUs

export PYTHONPATH=$PYTHONPATH:$pdnndir
export THEANO_FLAGS=mode=FAST_RUN,device=$device,floatX=float32

wget http://www.iro.umontreal.ca/~lisa/deep/data/mnist/mnist.pkl.gz

echo "Preparing datasets ..."
python data_prep.py

python  $pdnndir/cmds/run_DNN.py      --train-data "train.pickle.gz,partition=600m,random=true" \
                                  --valid-data "valid.pickle.gz,partition=600m,random=true" \
                                  --nnet-spec "784:1024:1024:1024:1024:1024:1901" \
                                  --wdir ./  --param-output-file dnn.mdl`

idhamari avatar Mar 14 '18 19:03 idhamari