Skip to content

Commit e2a8a71

Browse files
authored
Fix string comparison (#1014)
Fix string comparison in validate_initializer_name Signed-off-by: Chin Huang <[email protected]>
1 parent f6bebcc commit e2a8a71

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

onnx_tf/backend.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,8 @@ def tensor2list(onnx_tensor):
292292
return numpy_helper.to_array(onnx_tensor).flatten().tolist()
293293

294294
def validate_initializer_name(name):
295-
# Prepend a unique suffix if leading charater is "_"
296-
name = get_unique_suffix() + name if name[0] is "_" else name
295+
# Prepend a unique suffix if leading character is "_"
296+
name = get_unique_suffix() + name if name[0] == "_" else name
297297

298298
# Replace ":" with "_tf_" and append a unique suffix for
299299
# traceability

0 commit comments

Comments
 (0)