Problems with MLP and DenseDesignMatrixPyTables

20 views
Skip to first unread message

xser...@gmail.com

unread,
Sep 15, 2016, 12:27:04 PM9/15/16
to pylearn-users
Dear pylearn2 friends,

I am trying to feed a large dataset (600000 rgb images) to a MLP using SGD as trainer. I have created a subclass of DenseDesignMatrixPyTables, and stored the data using init_hdf5 and fill_hdf5. However, when feeding the resulting dataset to the trainer the following error arises:

Traceback (most recent call last):
File "individual_classification.py", line 157, in <module>
results = trainAndTest(datasets, path_models, path_img, path_pairs, experiment_params, first_time)
File "/home/workspace/xserraa/face_identification/scripts/libraries/Experiment.py", line 76, in trainAndTest
global_model.trainCNNModel(train_dataset,validation_dataset,validation_dataset,paths)
File "/home/workspace/xserraa/face_identification/scripts/libraries/GlobalModel.py", line 160, in trainCNNModel
trainer.train(dataset=train_dataset)
File "/home/workspace/xserraa/pylearn/pylearn2/training_algorithms/sgd.py", line 453, in train
for batch in iterator:
File "/home/workspace/xserraa/pylearn/pylearn2/utils/iteration.py", line 984, in next
rval = self._fallback_next(next_index)
File "/home/workspace/xserraa/pylearn/pylearn2/utils/iteration.py", line 1002, in _fallback_next
for data, fn in safe_izip(self._raw_data, self._convert)
File "/home/workspace/xserraa/pylearn/pylearn2/utils/iteration.py", line 1002, in <genexpr>
for data, fn in safe_izip(self._raw_data, self._convert)
File "/usr/local/lib/python2.7/dist-packages/tables/array.py", line 656, in __getitem__
coords = self._point_selection(key)
File "/usr/local/lib/python2.7/dist-packages/tables/leaf.py", line 561, in _point_selection
coords[idx] = (coords + self.shape)[idx]
ValueError: operands could not be broadcast together with shapes (51,) (2,)

Being 51 the number of instances (I have used a small dataset to speed testing the code). I do not know which could be the error, any help would be really appreciated, and please feel free to ask for any clarification.

Thank you very much,
Xavier

Reply all
Reply to author
Forward
0 new messages