Attributeerror: 'function' Object Has No Attribute 'fit'
I'm just starting with deep learning and python and I'm already stuck with this error when I try to train the model. I thought it would be an easy starting project to get together
Solution 1:
If you write baseline_model
, it returns the function, not the result.
Therefore baseline_model.fit
can't be called because 'function' object has no attribute 'fit'
You must execute the function to get its result, using parentheses - baseline_model()
- and then fit
will be performed on the result. ;)
tl;dr:
baseline_model.fit(
-> baseline_model().fit(
Post a Comment for "Attributeerror: 'function' Object Has No Attribute 'fit'"