A copy of this Tensor with contents backed by memory on the GPU. Arguments: gpu_index: Identifies which GPU to place the contents on the returned Tensor in. Returns: A GPU-memory backed Tensor object initialized with the same contents as this Tensor.
(self, gpu_index=0)
| 1055 | |
| 1056 | @deprecation.deprecated(None, "Use tf.identity instead.") |
| 1057 | def gpu(self, gpu_index=0): |
| 1058 | """A copy of this Tensor with contents backed by memory on the GPU. |
| 1059 | |
| 1060 | Arguments: |
| 1061 | gpu_index: Identifies which GPU to place the contents on the returned |
| 1062 | Tensor in. |
| 1063 | |
| 1064 | Returns: |
| 1065 | A GPU-memory backed Tensor object initialized with the same contents |
| 1066 | as this Tensor. |
| 1067 | """ |
| 1068 | return self._copy(context.context(), "GPU:" + str(gpu_index)) |
| 1069 | |
| 1070 | def set_shape(self, shape): |
| 1071 | if not self.shape.is_compatible_with(shape): |