MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / gpu

Method gpu

tensorflow/python/framework/ops.py:1057–1068  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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):

Callers 15

copy_tensorMethod · 0.45
testMatMulGPUMethod · 0.45
testSilentCopyMethod · 0.45
testTensorPlacementMethod · 0.45
testNumpyForceCPUMethod · 0.45
testMatMulGPUMethod · 0.45

Calls 2

_copyMethod · 0.95
contextMethod · 0.45

Tested by 15

copy_tensorMethod · 0.36
testMatMulGPUMethod · 0.36
testSilentCopyMethod · 0.36
testTensorPlacementMethod · 0.36
testNumpyForceCPUMethod · 0.36
testMatMulGPUMethod · 0.36