Skip to content

Commit 6174227

Browse files
author
Ziyuan Lin
committed
added a type check for tf.float16
1 parent fa230d6 commit 6174227

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tf2onnx/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ def get_tf_tensor_data(tensor):
148148
data = [0]
149149
elif tensor.dtype == tf.float32:
150150
data = [0.]
151+
elif tensor.dtype == tf.float16:
152+
data = [0]
151153
elif tensor.string_val:
152154
data = tensor.string_val
153155
else:

0 commit comments

Comments
 (0)