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

Method test_Identity

tensorflow/python/ops/init_ops_test.py:215–232  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

213 self.assertTrue('GPU' in w.handle.device)
214
215 def test_Identity(self):
216 with self.cached_session():
217 shape = (3, 4, 5)
218 for tensor_shape in [shape, tensor_shape_lib.TensorShape(shape)]:
219 with self.assertRaises(ValueError):
220 self._runner(
221 init_ops.Identity(),
222 tensor_shape,
223 target_mean=1. / int(tensor_shape[0]),
224 target_max=1.)
225
226 shape = (3, 3)
227 for tensor_shape in [shape, tensor_shape_lib.TensorShape(shape)]:
228 self._runner(
229 init_ops.Identity(),
230 tensor_shape,
231 target_mean=1. / int(tensor_shape[0]),
232 target_max=1.)
233
234 def test_Zeros(self):
235 shape = (4, 5)

Callers

nothing calls this directly

Calls 3

_runnerMethod · 0.95
cached_sessionMethod · 0.45
IdentityMethod · 0.45

Tested by

no test coverage detected