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

Method copy_tensor

tensorflow/python/framework/config_test.py:71–74  ·  view source on GitHub ↗
(dtype=dtypes.int32)

Source from the content-addressed store, hash-verified

69 context.ensure_initialized()
70
71 def copy_tensor(dtype=dtypes.int32):
72 cpu_tensor = constant_op.constant(1, dtype=dtype)
73 gpu_tensor = cpu_tensor.gpu()
74 self.assertAllEqual(cpu_tensor + gpu_tensor, 2.0)
75
76 config.set_device_policy('silent')
77 self.assertEqual(config.get_device_policy(), 'silent')

Callers 1

__init__Method · 0.80

Calls 3

constantMethod · 0.45
gpuMethod · 0.45
assertAllEqualMethod · 0.45

Tested by

no test coverage detected