MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / compute_mask

Method compute_mask

tensorflow/python/keras/engine/network.py:485–493  ·  view source on GitHub ↗
(self, inputs, mask)

Source from the content-addressed store, hash-verified

483 return self._is_graph_network and super(Network, self)._should_compute_mask
484
485 def compute_mask(self, inputs, mask):
486 if not self._is_graph_network:
487 return None
488
489 # TODO(omalleyt): b/123540974 This function is not really safe to call
490 # by itself because it will duplicate any updates and losses in graph
491 # mode by `call`ing the Layers again.
492 output_tensors = self._run_internal_graph(inputs, mask=mask)
493 return nest.map_structure(lambda t: t._keras_mask, output_tensors)
494
495 @property
496 def layers(self):

Callers

nothing calls this directly

Calls 1

_run_internal_graphMethod · 0.95

Tested by

no test coverage detected