Searched refs:grad_state (Results 1 – 6 of 6) sorted by relevance
48 merge_grad = grad_ctxt.grad_state.switch_map.get(op)66 grad_ctxt.grad_state.switch_map[op] = merge_grad110 if grad_ctxt and grad_ctxt.grad_state:115 grad_state = grad_ctxt.grad_state116 real_pred = grad_state.history_map.get(pred.name)119 grad_ctxt = grad_state.grad_context121 history_pred = grad_state.AddForwardAccumulator(pred)126 real_pred = grad_state.AddBackpropAccumulatedValue(history_pred, pred)127 grad_state.history_map[pred.name] = real_pred160 if op_ctxt.grad_state:[all …]
298 elif (while_ctxt.grad_state and299 IsContainingContext(while_ctxt.grad_state.forward_context,308 elif (while_ctxt.grad_state and309 while_ctxt.grad_state.forward_context is315 elif (input_while_ctxt.grad_state and316 input_while_ctxt.grad_state.forward_context is while_ctxt):321 elif (input_while_ctxt.grad_state and322 input_ctxt.grad_state.forward_context.grad_state and323 input_ctxt.grad_state.forward_context.grad_state.forward_context is
727 grad_state=self)741 grad_state=self)956 grad_state = self958 while pred is None and grad_state:959 pred = grad_state.history_map.get(cond_ctxt.pred.name)960 grad_state = grad_state.outer_grad_state1085 for grad_state in self._map.values():1086 for y in grad_state.forward_loop_exits:1088 grad_state.pending_exits_count -= 11090 grad_state.unused_exits.append(y)[all …]
804 grad_state = loop_state.GetGradState(x.op, before=False)805 grad_state.deferred_exits.append(x)806 grad_state.pending_exits_count -= 1807 if grad_state.pending_exits_count == 0:810 for y in grad_state.deferred_exits:815 grad_state.unused_exits.append(y)819 for y in grad_state.unused_exits:825 for y in grad_state.unused_exits:
454 def grad_state(self): member in TPUReplicateContext1482 def grad_state(self): member in _TPUInferenceContext
267 def grad_state(self): member in XLACompileContext