-
-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PlotLossesKeras not working due to TypeError #3
Comments
With Keras 2.0.5 it works well. In any case - how did you specify the loss function? (Could you provide code, at least |
Model is compiled with
Fitting is done according to your example:
where your example does
Printing out The stacktrace is:
|
Got the same error |
Solved with this commit: a9734f2 Let me know if it works. |
Nothing changed(( |
This fixed the issue at my end. You sure you have used Here's the ending of this command
|
I do. Error changed: now its: |
Could you provide the parts of code regarding the |
model.compile(optimizer=opt, loss=['mae'], metrics=['mae']) history = model.fit(X_train, Y_train, |
Ok, so it seems that this is the case: if the loss is defined as This is a solution if you have only 1 loss function. As for more loss functions, it seems that and the accompanying function
aren't written to accomodate multiple losses |
@utausheva Write For typical networks there is only one loss function, see https://keras.io/models/model/#compile. |
@utausheva Please open a separate issue with PyCharm. Make sure to provide complete examples and versions. (In this thread I am deleting off-topic comments.) |
Looked at https://github.com/keras-team/keras/blob/master/keras/engine/training.py. Now |
For Keras version 2.1.3 the PlotLossesKeras crashes due to error in line 33 of keras_plot.py
Reason for this is:
self.metric2printable['loss'] = self.metric2printable.get(self.model.loss, self.model.loss) + " (cost function)"
where this breaks due to self.model.loss being a keras function. This results in
TypeError: unsupported operand type(s) for +: 'function' and 'str'
The text was updated successfully, but these errors were encountered: