Commit e9da8f89 authored by Yuxin Wu's avatar Yuxin Wu

fix bug in get_op_tensor_name. Make sample in GAN examples work.

parent 562f0906
......@@ -81,7 +81,7 @@ def get_op_tensor_name(name):
Returns:
tuple: (op_name, tensor_name)
"""
if name[-2] == ':':
if len(name) >= 3 and name[-2] == ':':
return name[:-2], name
else:
return name, name + ':0'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment