def watch_variable(tape, variable): """Marks this variable to be watched by the given tape.""" strategy = distribution_strategy_context.get_distribution_strategy() if distribution_strategy_context.get_replica_context(): variables = [strategy.value_container(variable)] else: variables = strategy.unwrap(variable) for var in variables: pywrap_tensorflow.TFE_Py_TapeWatchVariable(tape._tape, var) # pylint: disable=protected-access
def watch_variable(tape, variable): """Marks this variable to be watched by the given tape.""" strategy, context = ( distribution_strategy_context.get_strategy_and_replica_context()) if context: variables = [strategy.extended.value_container(variable)] else: variables = strategy.experimental_local_results(variable) for var in variables: pywrap_tensorflow.TFE_Py_TapeWatchVariable(tape._tape, var) # pylint: disable=protected-access
def watch_variable(tape, variable): """Marks this variable to be watched by the given tape.""" pywrap_tensorflow.TFE_Py_TapeWatchVariable(tape._tape, variable) # pylint: disable=protected-access
def watch_variable(self, v): pywrap_tensorflow.TFE_Py_TapeWatchVariable(self._tape, v)