You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using skflow of tensorflow(0.10.0rc0), I create a TensorFlowDNNRegressor model and saved to local, when I try to restore it gives me exception:
new_regressor = skflow.TensorFlowEstimator.restore('/Users/yichen.wei/Desktop/xiaoxiang_ml/model') File "/Users/yichen.wei/project/vscienv/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/estimators/base.py", line 326, in restore raise ValueError("Restore folder doesn't contain model definition.").
Then I add a file model.def to my model directory and restore again it gives me
new_regressor = skflow.TensorFlowEstimator.restore('/Users/yichen.wei/Desktop/xiaoxiang_ml/model') File "/Users/yichen.wei/project/vscienv/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/estimators/base.py", line 331, in restore model_def = json.loads(fmodel.read()) File "/usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/json/init.py", line 319, in loads return _default_decoder.decode(s) File "/usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/json/decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
It seems need json model definition in model.def file but it didn't create when saving.
Could someone help with this issue? Thanks!
PS: dir of saved model :
checkpoint
events.out.tfevents
graph.pbtxt
model.ckpt-xxxx-xxxxx-of-xxxxx
model.ckpt-xxxx.meta
env:
OS X EI Capitan 10.11.6
Python: 3.5.2
tensorflow: 0.10.0rc0
The text was updated successfully, but these errors were encountered:
@kinddevil You should use DNNRegressor instead of TensorFlowDNNRegressor (which is deprecated).
Restoring is done via providing the same model_dir to the constructor.
I am using skflow of tensorflow(0.10.0rc0), I create a TensorFlowDNNRegressor model and saved to local, when I try to restore it gives me exception:
new_regressor = skflow.TensorFlowEstimator.restore('/Users/yichen.wei/Desktop/xiaoxiang_ml/model') File "/Users/yichen.wei/project/vscienv/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/estimators/base.py", line 326, in restore raise ValueError("Restore folder doesn't contain model definition.").
Then I add a file model.def to my model directory and restore again it gives me
new_regressor = skflow.TensorFlowEstimator.restore('/Users/yichen.wei/Desktop/xiaoxiang_ml/model') File "/Users/yichen.wei/project/vscienv/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/estimators/base.py", line 331, in restore model_def = json.loads(fmodel.read()) File "/usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/json/init.py", line 319, in loads return _default_decoder.decode(s) File "/usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/json/decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
It seems need json model definition in model.def file but it didn't create when saving.
Could someone help with this issue? Thanks!
PS: dir of saved model :
checkpoint
events.out.tfevents
graph.pbtxt
model.ckpt-xxxx-xxxxx-of-xxxxx
model.ckpt-xxxx.meta
env:
OS X EI Capitan 10.11.6
Python: 3.5.2
tensorflow: 0.10.0rc0
The text was updated successfully, but these errors were encountered: