keras: fit_generator complains validation_freq is unexpected keyword
Hello. Love Keras! I have a relatively straight-forward call in my code to fit_generator
but it is returning that one of the parameters (validation_freq) is unexpected. However, all the documentation and even the code to fit_generator
shows it is an acceptable parameter.
The call, where parallel_model is an object of type Sequential
parallel_model.compile(loss='categorical_crossentropy',
optimizer=rms,
metrics=['accuracy'])
train_generator = parallel_model.fit_generator(
generator=complex_data_generator(x_data, y_data, config),
epochs=400,
steps_per_epoch=(len(y_data)/DEFAULT_BATCH_SIZE),
callbacks=callbacks,
validation_data=(vx_data, vy_data),
validation_freq=10)
The error response:
Traceback (most recent call last):
File "train.py", line 102, in <module>
validation_freq=10)
File "/usr/local/lib/python2.7/dist-packages/keras/legacy/interfaces.py", line 91, in wrapper
return func(*args, **kwargs)
TypeError: fit_generator() got an unexpected keyword argument 'validation_freq'
Keras & Tensorflow Versions
>>> import keras
Using TensorFlow backend.
>>> keras.__version__
'2.2.4'
>>> import tensorflow
>>> tensorflow.__version__
'1.13.1'
Perhaps this is user error on my behalf but I do not think this is expected behavior given the docs. Thanks!
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 3
- Comments: 15
Well perhaps for now; I too had install from git to fix the issue