Skip to content

Commit 426f03a

Browse files
shraman-rcmn-robot
authored andcommitted
Internal change
PiperOrigin-RevId: 314227300
1 parent e6beacf commit 426f03a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

morph_net/tools/configurable_ops.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ def __init__(self,
191191
fallback_rule = FallbackRule[fallback_rule] # Converts from string.
192192
self._default_to_zero = fallback_rule == FallbackRule.zero
193193
self._strict = fallback_rule == FallbackRule.strict
194+
self.default_scope_to_counts_map = {}
194195

195196
# To keep track of the number of identical scopes encountered
196197
self._scope_counts = {}
@@ -317,6 +318,8 @@ def _mask(self, function, suffix, *args, **kwargs):
317318
if is_vanished(inputs):
318319
return VANISHED
319320

321+
# Support for tf.contrib.layers and tf.layers API.
322+
op_scope = kwargs.get('scope')
320323
current_scope = framework.get_name_scope() or ''
321324
if current_scope and not current_scope.endswith('/'):
322325
current_scope += '/'

0 commit comments

Comments
 (0)