Replies: 1 comment
-
Hi, I don't have any experience with saved_model_cli per se, but the error is definitely because TFC defines some TF ops (mostly for entropy coding) that don't exist in TF core. These need to be registered before they can be used in a SavedModel. Checking the source code of saved_model_cli, I don't see a way to specify custom ops to be loaded before handling the model. One thing you could try is simply editing saved_model_cli.py, and adding a line
to the beginning of the file, after the other imports. Importing TFC has the effect of registering the ops, which should make it work. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Observation:
While using saved_model_cli show --dir bls2017 --all, got error:
Traceback (most recent call last):
File "/home/anaconda3/lib/python3.8/site-packages/tensorflow/python/framework/ops.py", line 4199, in _get_op_def
return self._op_def_cache[type]
KeyError: 'CreateRangeDecoder''
Supplement Mateiral:
bls2017 model is trained with script provided in this repository, no modification.
Got same KeyErrors when using various of conda environment, conda environment are created by below command:
conda create --name tfc211 python cudatoolkit cuda
conda activate tfc211
pip install tensorflow-compression==2.11.0
...
conda create --name tfc280 python cudatoolkit cuda
conda activate tfc280
pip install tensorflow-compression==2.8.0
when install Tensorflow-compression in tensorflow docker, (see below command line). When doing the test, No function library in tensorflow/core/framework: please see below screenshot:
docker run tensorflow/tensorflow:latest bash -c
"pip install tensorflow-compression &&
python -m tensorflow_compression.all_tests"
based on above observation, I double "CreateRangeDecoder" is not in the tensorflow/core? How to work around it?
thanks for all!
Beta Was this translation helpful? Give feedback.
All reactions