py_train_on_whole_dataset.py bug fixed