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

Method rand

tensorflow/python/kernel_tests/cwise_ops_unary_test.py:543–548  ·  view source on GitHub ↗
(dtype, real_range)

Source from the content-addressed store, hash-verified

541 ]
542
543 def rand(dtype, real_range):
544 x = np.random.uniform(
545 real_range[0], real_range[1], size=shape[0]).astype(dtype)
546 if dtype in (np.complex64, np.complex128):
547 x += 1j * np.random.uniform(-2, 2, size=shape[0]).astype(dtype)
548 return x
549
550 for op, real_range in op_range:
551 with self.cached_session():

Callers 15

random_batchFunction · 0.80
random_batchFunction · 0.80
test_invalid_shapesMethod · 0.80
test_invalid_shapesMethod · 0.80
test_invalid_shapesMethod · 0.80
synthetic_dataFunction · 0.80
make_random_centersFunction · 0.80
_run_test_alsMethod · 0.80

Calls 1

uniformMethod · 0.80

Tested by

no test coverage detected