-
- Downloads
Add __array__ method to `tf.Variable`.
`np.array` converts a `tf.Tensor`. It should work on a `tf.Variable` too. This seems like the right class to add it to since this is the class that implements `.numpy()` for Variable. ``` >>> np.array(tf.Variable([1.0])) array([1.], dtype=float32) ``` PiperOrigin-RevId: 322345276 Change-Id: I66a6e19f66ed444f0f0bdbd48e340ef76e443e20
Loading
Please register or sign in to comment