New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'saved_model_cli.py' bug fix! #15611
Comments
It's not necessary to do that, See the definition of def keys(self):
"""Return a list of the string names in the enum.
These are returned in the order they were defined in the .proto file.
"""
return [value_descriptor.name
for value_descriptor in self._enum_type.values] and values=[
_descriptor.EnumValueDescriptor(
name='DT_INVALID', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='DT_FLOAT', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='DT_DOUBLE', index=2, number=2,
options=None,
type=None),
...
] |
When I run tfdbg:
The type of |
Yes, my mistake, for |
This is a simple example to show the usage of
Then run
The result is :
I change
By the way, I use |
/CC @sukritiramesh |
Thanks @huaxz1986! Will fix this internally! |
In file
python/tools/saved_model_cli.py
at functiondef _print_tensor_info(tensor_info):
The first line should be:
print(' dtype: ' + {value:key for (key,value) in types_pb2.DataType.items()}[tensor_info.dtype])
Not be :
print(' dtype: ' + types_pb2.DataType.keyss()[tensor_info.dtype])
because
tensor_info.dtype
is an Integer which is the value of types(not the index of type values).The text was updated successfully, but these errors were encountered: