| 383 | """ |
| 384 | |
| 385 | class CGState(NamedTuple): |
| 386 | i: tf.Tensor |
| 387 | v: tf.Tensor |
| 388 | r: tf.Tensor |
| 389 | p: tf.Tensor |
| 390 | rz: tf.Tensor |
| 391 | |
| 392 | def stopping_criterion(state: CGState) -> tf.Tensor: |
| 393 | return (0.5 * state.rz > cg_tolerance) and (state.i < max_steps) |
no outgoing calls
no test coverage detected
searching dependent graphs…