Repository navigation
fix tf_text_graph_common tensor_content type bug - #13904
Conversation
|
@cftang0827, thank you! Could you please share a way how this bug affects import? |
|
Hi, actually it's in
That's the script that generate model related config file. Thanks. |
|
@cftang0827, This code part depends on TensorFlow version only. In example, for TensorFlow |
| if node.op == 'Const': | ||
| if 'value' in node.attr and node.attr['value'].tensor.tensor_content: | ||
| node.attr['value'].tensor.tensor_content = '' | ||
| node.attr['value'].tensor.tensor_content = bytes('', 'utf-8') |
There was a problem hiding this comment.
I'd like to propose a bit different solution:
node.attr['value'].tensor.tensor_content = b''I can now reproduce the problem (tested with different versions of TF and python).
There was a problem hiding this comment.
Thank you for your suggestion, and I think it's the better and simpler solution. Thank you.
|
@cftang0827, please change the base branch from 3.4 to master (Please do not close pull request but just create a new branch with the same name |
d9e9ec4 to
98d8436
Compare
This pullrequest changes
Fix the bug in creating tensorflow model's pbtxt file.
The type of tensor.tensor_content should be
bytesnotstr