Skip to content

Commit d41667f

Browse files
pkchmn-robot
authored andcommitted
Internal change
PiperOrigin-RevId: 321224367
1 parent 4813cc2 commit d41667f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

morph_net/tools/configurable_ops.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ def is_vanished(maybe_tensor):
121121
Returns:
122122
A boolean, whether maybe_tensor is a tensor.
123123
"""
124-
return maybe_tensor == VANISHED or maybe_tensor is None
124+
return (isinstance(maybe_tensor, float) and
125+
maybe_tensor == VANISHED) or maybe_tensor is None
125126

126127

127128
class FallbackRule(Enum):

0 commit comments

Comments
 (0)