def apply(self, fgraph): for o in fgraph.outputs: try: fgraph.replace_validate( o, _output_guard(o), reason='output_guard') _logger.info("Output variable %s required output_guard, " "how was this output left unprotected against " "destructive operations?" % o) except gof.InconsistencyError: # This output is already impossible to destroy. # No guard necessary pass
def apply(self, fgraph): for o in fgraph.outputs: try: fgraph.replace_validate(o, _output_guard(o), reason='output_guard') _logger.info("Output variable %s required output_guard, " "how was this output left unprotected against " "destructive operations?" % o) except gof.InconsistencyError: # This output is already impossible to destroy. # No guard necessary pass