You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi.
I tried to run main.py for cuhk03,but I met a problem.Additionally,my tensorflow version is 1.4.0,keras is 2.0.8,python is 3.6.2 and cuDNN is 6.0.I really don't know how to solve.Thanks for your help!
Error information is as follows:
Model Compile Successful.
number 0 in 100
F:/py/main.py:44: UserWarning: The semantics of the Keras 2 argument steps_per_epoch is not the same as the Keras 1 argument samples_per_epoch. steps_per_epoch is the number of batches to draw from the generator at each epoch. Basically steps_per_epoch = samples_per_epoch/batch_size. Similarly nb_val_samples->validation_steps and val_samples->steps arguments have changed. Update your method calls accordingly.
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)
F:/py/main.py:44: UserWarning: Update your fit_generator call to the Keras 2 API: fit_generator(<data_prep..., 30000, 1, validation_data=<data_prep..., validation_steps=1000)
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)
Traceback (most recent call last):
File "F:/py/main.py", line 101, in
main(dataset_path)
File "F:/py/main.py", line 21, in main
train(model, dataset_path)
File "F:/py/main.py", line 44, 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 "D:\Program Files (x86)\Anaconda3\lib\site-packages\keras\legacy\interfaces.py", line 87, in wrapper
return func(*args, **kwargs)
File "D:\Program Files (x86)\Anaconda3\lib\site-packages\keras\engine\training.py", line 1926, in fit_generator
self._make_train_function()
File "D:\Program Files (x86)\Anaconda3\lib\site-packages\keras\engine\training.py", line 960, in _make_train_function
loss=self.total_loss)
TypeError: get_updates() missing 1 required positional argument: 'constraints'
Process finished with exit code 1
The text was updated successfully, but these errors were encountered:
Hi.
I tried to run main.py for cuhk03,but I met a problem.Additionally,my tensorflow version is 1.4.0,keras is 2.0.8,python is 3.6.2 and cuDNN is 6.0.I really don't know how to solve.Thanks for your help!
Error information is as follows:
Model Compile Successful.
number 0 in 100
F:/py/main.py:44: UserWarning: The semantics of the Keras 2 argument
steps_per_epoch
is not the same as the Keras 1 argumentsamples_per_epoch
.steps_per_epoch
is the number of batches to draw from the generator at each epoch. Basically steps_per_epoch = samples_per_epoch/batch_size. Similarlynb_val_samples
->validation_steps
andval_samples
->steps
arguments have changed. Update your method calls accordingly.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)
F:/py/main.py:44: UserWarning: Update your
fit_generator
call to the Keras 2 API:fit_generator(<data_prep..., 30000, 1, validation_data=<data_prep..., validation_steps=1000)
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)
Traceback (most recent call last):
File "F:/py/main.py", line 101, in
main(dataset_path)
File "F:/py/main.py", line 21, in main
train(model, dataset_path)
File "F:/py/main.py", line 44, 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 "D:\Program Files (x86)\Anaconda3\lib\site-packages\keras\legacy\interfaces.py", line 87, in wrapper
return func(*args, **kwargs)
File "D:\Program Files (x86)\Anaconda3\lib\site-packages\keras\engine\training.py", line 1926, in fit_generator
self._make_train_function()
File "D:\Program Files (x86)\Anaconda3\lib\site-packages\keras\engine\training.py", line 960, in _make_train_function
loss=self.total_loss)
TypeError: get_updates() missing 1 required positional argument: 'constraints'
Process finished with exit code 1
The text was updated successfully, but these errors were encountered: