I am trying to restore a model from saved state and got the error
Traceback (most recent call last):
File "predict.py", line 116, in <module>
df_predict[v] = predict_with(v)
File "predict.py", line 95, in predict_with
fm.load_state(model_file)
File "/home/revenueml/git/revenueml/revenueml/tffm/base.py", line 300, in load_state
self.core.build_graph()
File "/home/revenueml/git/revenueml/revenueml/tffm/core.py", line 183, in build_graph
assert self.n_features is not None
AssertionError
I fixed this with
fm.core.set_num_features(fmap.index.size)
Hope this can help somebody else.
Please add some usage on restoring models in readme, this may be quite helpful.
I am trying to restore a model from saved state and got the error
I fixed this with
Hope this can help somebody else.
Please add some usage on restoring models in readme, this may be quite helpful.