cjlin1 / simpleNN

BSD 3-Clause "New" or "Revised" License
48 stars 16 forks source link

Exception not handled in train.py when --val_set is not provided #1

Open djshen opened 4 years ago

djshen commented 4 years ago

https://github.com/cjlin1/simpleNN/blob/ad58af428dd16f80e095fd2ac8a5adaedab81f9c/Python/train.py#L305-L308 If --val_set is not provided, val_data will be set to None, which will cause an exception like:

TypeError: 'NoneType' object is not subscriptable

This case is handled in the gradient_trainer function.

quanpr commented 4 years ago

Hi,

Thanks for your interest in trying our work. The exception is now handled. For your information, if no validation set is provided during the training phase, we will store the model in the last iteration for future prediction.

Best, Pengrui