(self, val, inputs, grads)
| 2932 | return tf.cast(a, dtype=type_as.dtype) |
| 2933 | |
| 2934 | def set_gradients(self, val, inputs, grads): |
| 2935 | @tf.custom_gradient |
| 2936 | def tmp(input): |
| 2937 | def grad(upstream): |
| 2938 | return grads |
| 2939 | |
| 2940 | return val, grad |
| 2941 | |
| 2942 | return tmp(inputs) |
| 2943 | |
| 2944 | def _detach(self, a): |
| 2945 | return tf.stop_gradient(a) |
no outgoing calls