Commit e0cd3cdb authored by Yuxin Wu's avatar Yuxin Wu

fix some empty op_def issues in old TF

parent 79c93370
...@@ -48,7 +48,7 @@ bugs. See https://github.com/tensorpack/tensorpack/issues/497 for workarounds.") ...@@ -48,7 +48,7 @@ bugs. See https://github.com/tensorpack/tensorpack/issues/497 for workarounds.")
""" """
Whether an op is possibly blocking. Whether an op is possibly blocking.
""" """
if not x.op_def.is_stateful: if x.op_def is not None and not x.op_def.is_stateful:
return False return False
if "Dequeue" in x.type or "Enqueue" in x.type: if "Dequeue" in x.type or "Enqueue" in x.type:
return True return True
......
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