Trouble using dp converted model #1981
Unanswered
rajnichahal
asked this question in
Q&A
Replies: 1 comment 13 replies
-
Could you provide the model? |
Beta Was this translation helpful? Give feedback.
13 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I trained a deepmd model using deepmd version 1.2.1. In order to use the python API for deepmd version 2.1.1, I converted the model using following:
dp convert-from 1.2 -i old_frozen_model.pb -o new_frozen_model.pb
The model conversion was successful, but it is giving me the following error message when using Python API as below:
dp = DeepPot('new_frozen_model.pb')
Error message
/usr/local/envs/deepmd/lib/python3.10/site-packages/scipy/init.py:146: UserWarning: A NumPy version >=1.16.5 and <1.23.0 is required for this version of SciPy (detected version 1.23.1
warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
WARNING:tensorflow:From /usr/local/envs/deepmd/lib/python3.10/site-packages/tensorflow/python/compat/v2_compat.py:107: disable_resource_variables (from tensorflow.python.ops.variable_scope) is deprecated and will be removed in a future version.
Instructions for updating:
non-resource variables are not supported in the long term
WARNING:root:To get the best performance, it is recommended to adjust the number of threads by setting the environment variables OMP_NUM_THREADS, TF_INTRA_OP_PARALLELISM_THREADS, and TF_INTER_OP_PARALLELISM_THREADS.
WARNING:root:Environment variable KMP_BLOCKTIME is empty. Use the default value 0
WARNING:root:Environment variable KMP_AFFINITY is empty. Use the default value granularity=fine,verbose,compact,1,0
/usr/local/envs/deepmd/lib/python3.10/importlib/init.py:169: UserWarning: The NumPy module was reloaded (imported a second time). This can in some cases result in small but subtle issues and is discouraged.
_bootstrap._exec(spec, module)
Traceback (most recent call last):
File "/project/uml_stephen_lam/Rajni/pca_tsne/deepmd_data/get_data3_11_atomic.py", line 9, in
dp = DeepPot('new_frozen_model.pb')
File "/usr/local/envs/deepmd/lib/python3.10/site-packages/deepmd/infer/deep_pot.py", line 88, in init
DeepEval.init(
File "/usr/local/envs/deepmd/lib/python3.10/site-packages/deepmd/infer/deep_eval.py", line 41, in init
self.graph = self._load_graph(
File "/usr/local/envs/deepmd/lib/python3.10/site-packages/deepmd/infer/deep_eval.py", line 154, in _load_graph
graph_def.ParseFromString(f.read())
google.protobuf.message.DecodeError: Error parsing message with type 'tensorflow.GraphDef'
Please let me know how can I resolve this error. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions