Error message is as follow:
File "F:/Implementation-CVPR2015-CNN-for-ReID-master/CUHK03/main.py", line 109, in
main('F:/Implementation-CVPR2015-CNN-for-ReID-master/CUHK03/cuhk-03.h5')
File "F:/Implementation-CVPR2015-CNN-for-ReID-master/CUHK03/main.py", line 21, in main
train(model, dataset_path)
File "F:/Implementation-CVPR2015-CNN-for-ReID-master/CUHK03/main.py", line 49, in train
model.fit_generator(Data_Generator.flow(f,flag = flag_train),
one_epoch,epoch_num,
validation_data=Data_Generator.flow(f,train_or_validation=which_val_data,flag=flag_val),
nb_val_samples=nb_val_samples)
File "E:\Anaconda\lib\site-packages\keras\legacy\interfaces.py", line 91, in wrapper
return func(*args, **kwargs)
File "E:\Anaconda\lib\site-packages\keras\engine\training.py", line 2079, in fit_generator
do_validation = bool(validation_data)
TypeError: 'float' object cannot be interpreted as an integer
python version: 3.5.2
keras version:2.1.5
tensorflow-gpu:1.7
OS:windows 10
It seems that bool() need a integer argument,but 'validation_data' is an object of class 'NumpyArrayIterator_for_CUHK03 '. I don't know how to deal with it.Thanks for your help.
@Ning-Ding
Error message is as follow: File "F:/Implementation-CVPR2015-CNN-for-ReID-master/CUHK03/main.py", line 109, in
main('F:/Implementation-CVPR2015-CNN-for-ReID-master/CUHK03/cuhk-03.h5')
File "F:/Implementation-CVPR2015-CNN-for-ReID-master/CUHK03/main.py", line 21, in main train(model, dataset_path)
File "F:/Implementation-CVPR2015-CNN-for-ReID-master/CUHK03/main.py", line 49, in train model.fit_generator(Data_Generator.flow(f,flag = flag_train), one_epoch,epoch_num, validation_data=Data_Generator.flow(f,train_or_validation=which_val_data,flag=flag_val), nb_val_samples=nb_val_samples)
File "E:\Anaconda\lib\site-packages\keras\legacy\interfaces.py", line 91, in wrapper return func(*args, **kwargs)
File "E:\Anaconda\lib\site-packages\keras\engine\training.py", line 2079, in fit_generator do_validation = bool(validation_data)
TypeError: 'float' object cannot be interpreted as an integer
python version: 3.5.2 keras version:2.1.5 tensorflow-gpu:1.7 OS:windows 10
It seems that bool() need a integer argument,but 'validation_data' is an object of class 'NumpyArrayIterator_for_CUHK03 '. I don't know how to deal with it.Thanks for your help. @Ning-Ding