Home | History | Annotate | Download | only in ops

Lines Matching refs:state

76     output: A namedtuple representing the final state with fields:
84 # ephemeral class holding CG state.
87 def stopping_criterion(i, state):
88 return math_ops.logical_and(i < max_iter, linalg_ops.norm(state.r) > tol)
90 def cg_step(i, state): # pylint: disable=missing-docstring
91 z = operator.apply(state.p)
92 alpha = state.gamma / util.dot(state.p, z)
93 x = state.x + alpha * state.p
94 r = state.r - alpha * z
97 beta = gamma / state.gamma
98 p = r + beta * state.p
102 beta = gamma / state.gamma
103 p = q + beta * state.p
123 state = cg_state(i=i, x=x, r=r0, p=p0, gamma=gamma0)
124 _, state = control_flow_ops.while_loop(stopping_criterion, cg_step,
125 [i, state])
127 state.i,
128 x=array_ops.squeeze(state.x),
129 r=array_ops.squeeze(state.r),
130 p=array_ops.squeeze(state.p),
131 gamma=state.gamma)