yajiemiao / pdnn

PDNN: A Python Toolkit for Deep Learning. http://www.cs.cmu.edu/~ymiao/pdnntk.html
Apache License 2.0
224 stars 105 forks source link

DNN training error #46

Closed somnath-banerjee closed 4 years ago

somnath-banerjee commented 8 years ago

Hi, I have a small dataset for classification(9 classes). 137 training samples with 20 fratures. validation set has 13 samples. I have created the pickle files as described in your example.

But, when I run the command: python $pdnndir/cmds/run_DNN.py --train-data "train.pickle.gz" \ --valid-data "valid.pickle.gz" \ --nnet-spec "20:1024:1024:9" --wdir ./ \ --l2-reg 0.0001 --lrate "C:0.1:10" \ --model-save-step 20 --param-output-file dnn.param \ --cfg-output-file dnn.cfg > dnn.training.log

I got the following error: Traceback (most recent call last): File "/home/somu/pdnn/cmds/run_DNN.py", line 56, in cfg.init_data_reading(train_data_spec, valid_data_spec) File "/home/somu/pdnn/utils/network_config.py", line 94, in init_data_reading self.train_sets, self.train_xy, self.train_x, self.train_y = read_dataset(train_dataset, train_dataset_args) File "/home/somu/pdnn/io_func/data_io.py", line 83, in read_dataset data_reader = PickleDataRead(file_path_list, read_opts) File "/home/somu/pdnn/io_func/pickle_io.py", line 36, in init self.pfile_path = pfile_path_list[0] IndexError: list index out of range

Could you please help me to correct the error.

Another thing I would like to know: Each training sample has 20 columns, so I have used 20 in the --net-spec "20:1024:1024:9". Again 9 in the last parameter as I have 9 output classes. Is this correct?