File "/home/susheel/LearnPython/local/lib/python2.7/site-packages/keras/models.py", line 848, in fit raise TypeError('Unrecognized keyword arguments: ' + str(kwargs)) TypeError: Unrecognized keyword arguments: {'show_accuracy': True}
While I am trying to find the sentiment on Yelp Data Academic.json using CNN in deep learning. I am getting the above error I treid its coming in numpy error but i didnt resolved can anyone help how can
If you want to print the accuracy while training your model you do not need to specify it in model.fit
but in the model.compile
. Here you can set the metrics=['accuracy']
argument.
Example
model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy'])
model.fit(X, Y, verbose=1)
EDIT:
In older versions of Keras (< 1) the argument show_accuracy=True
does exist.
EDIT 2:
With tensorflow 2.0 keras is included. With this version you should use metrics=['acc']
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With