Open jackaraz opened 3 years ago
Hm, good question. The example in the documentation (http://rasbt.github.io/mlxtend/user_guide/evaluate/bias_variance_decomp/#example-3-tensorflowkeras-support) was ran with having TensorFlow v2.3.1 installed on my machine and only tried with Sequential
. Maybe
if estimator.__class__.__name__ in ['Sequential', 'Functional']
is not backwards compatible with earlier versions of Tf or it doesn't work for tf.keras.models.Model
. Maybe @hanzigs knows a little bit more and could help
Yes, else part is not for tf keras model, and I worked that with Tensorflow 2.3.0. Have to check this estimator.__class__.__name__
for earlier versions.
Hi All
Hope you are doing fine in these strange times. I got a problem with
bias_variance_decomp
while using it fortf.keras.models.Model
. The problem was coming from/mlxtend/evaluate/bias_variance_decomp.py
L110. First of all, for some reason my model can't passif estimator.__class__.__name__ in ['Sequential', 'Functional']
so it goes through else at L108 where code takespred = estimator.fit(...).predict(...)
butestimator.fit
is just history object apparently and it doesn't havepredict
functionality, so I patched it as followsbut wanted to run by you to see if it might create any problem in the future or if I'm missing anything.
Python version 3.6 Tensorflow v2.1 (Keras within)
Thanks Cheers Jack