Home
last modified time | relevance | path

Searched refs:np_dtype (Results 1 – 20 of 20) sorted by relevance

/external/tensorflow/tensorflow/python/kernel_tests/
Dlinalg_ops_test.py83 for np_dtype, atol in [(np.float32, 0.05), (np.float64, 1e-5),
85 with self.subTest(n=n, np_dtype=np_dtype, atol=atol):
86 matrix = _RandomPDMatrix(n, self.rng, np_dtype)
97 for np_dtype, atol in [(np.float32, 0.05), (np.float64, 1e-5),
99 with self.subTest(np_dtype=np_dtype, atol=atol):
100 matrix = (np.eye(20) * 1e-6).astype(np_dtype)
115 for np_dtype, atol in [(np.float32, 0.05), (np.float64, 1e-5),
117 with self.subTest(n=n, np_dtype=np_dtype, atol=atol):
118 matrix = _RandomPDMatrix(n, self.rng, np_dtype)
127 for np_dtype, atol in [(np.float32, 0.05), (np.float64, 1e-5),
[all …]
Dself_adjoint_eig_op_test.py146 np_dtype = dtype_.as_numpy_dtype
148 low=-1.0, high=1.0, size=n * n).reshape([n, n]).astype(np_dtype)
151 low=-1.0, high=1.0, size=n * n).reshape([n, n]).astype(np_dtype)
191 np_dtype = dtype_.as_numpy_dtype
195 low=-1.0, high=1.0, size=n * n).reshape([n, n]).astype(np_dtype)
198 low=-1.0, high=1.0, size=n * n).reshape([n, n]).astype(np_dtype)
204 epsilon = np.finfo(np_dtype).eps
Deig_op_test.py150 np_dtype = dtype_.as_numpy_dtype
155 low=-1.0, high=1.0, size=n * n).reshape([n, n]).astype(np_dtype)
158 low=-1.0, high=1.0, size=n * n).reshape([n, n]).astype(np_dtype)
202 np_dtype = dtype_.as_numpy_dtype
207 low=-1.0, high=1.0, size=n * n).reshape([n, n]).astype(np_dtype)
210 low=-1.0, high=1.0, size=n * n).reshape([n, n]).astype(np_dtype)
215 epsilon = np.finfo(np_dtype).eps
Dsparse_tensor_dense_matmul_op_test.py204 def _testLarge(self, np_dtype): argument
212 x = _maybe_complex(np.random.rand(m, k).astype(np_dtype))
215 y = _maybe_complex(np.random.randn(k, n).astype(np_dtype))
Dsparse_add_op_test.py53 def _randomTensor(self, size, np_dtype, sparse=True): argument
55 x = np.random.randn(n, m).astype(np_dtype)
Dconfusion_matrix_test.py81 def _testConfMatrixOnTensors(self, tf_dtype, np_dtype): argument
108 truth = np.zeros([2, 2], dtype=np_dtype)
112 self.assertEqual(cm_out.dtype, np_dtype)
Dtensor_array_ops_test.py973 np_dtype = dtype.as_numpy_dtype
1003 v0 = array_ops.identity(np.arange(3 * 5, dtype=np_dtype).reshape(3, 5))
1004 state0 = array_ops.identity(np.array([1] * 5, dtype=np_dtype))
1005 init_val = np.arange(100, 105, dtype=np_dtype)
1009 dtype=np_dtype,
1013 grad_val = -np.arange(3 * 5, dtype=np_dtype).reshape(3, 5)
Darray_ops_test.py362 def _reverse1DimAuto(self, np_dtype): argument
363 x_np = np.array([1, 200, 3, 40, 5], dtype=np_dtype)
373 def _reverse2DimAuto(self, np_dtype): argument
374 x_np = np.array([[1, 200, 3], [4, 5, 60]], dtype=np_dtype)
542 def _compareDiffType(self, n, np_dtype, use_gpu): argument
546 x = np.linspace(-10, 10, 5).astype(np_dtype)
547 if np_dtype in (np.complex64, np.complex128):
Dpadding_fifo_queue_test.py1576 np_dtype = dtype.as_numpy_dtype
1581 np_array = np.sqrt(np_array.astype(np_dtype))
1583 np_array = np_array.astype(np_dtype)
Dfifo_queue_test.py599 np_dtype = dtype.as_numpy_dtype
604 np_array = np.sqrt(np_array.astype(np_dtype))
606 np_array = np_array.astype(np_dtype)
Drnn_cell_test.py2578 np_dtype = dtype.as_numpy_dtype
2621 [[0.240, 0.240]], dtype=np_dtype), 1e-2)
2624 dtype=np_dtype)
2635 x: np.array([[1., 1., 1.]], dtype=np_dtype),
2636 m: 0.1 * np.ones([1, 4], dtype=np_dtype)
/external/tensorflow/tensorflow/python/kernel_tests/random/
Drandom_grad_test.py125 np_dtype = dtype.as_numpy_dtype
130 alpha_val = np.logspace(-2, 3, dtype=np_dtype)
133 [], alpha, np_dtype(1.0), dtype=dtype, seed=12345)
177 np_dtype = dtype.as_numpy_dtype
178 alpha = constant_op.constant(np.logspace(-2, 3, dtype=np_dtype))
180 [], alpha, np_dtype(1.0), dtype=dtype, seed=12345)
/external/autotest/client/cros/audio/
Daudio_data.py95 np_dtype = '%s%d' % (sample_format_dict['dtype_str'],
99 np_array = np.fromstring(binary, dtype=np_dtype)
/external/tensorflow/tensorflow/python/keras/layers/preprocessing/
Dtable_utils.py252 np_dtype = dtypes.as_dtype(dtype).as_numpy_dtype
253 if np.can_cast(array.dtype, np_dtype):
254 array = array.astype(np_dtype, casting="safe")
/external/tensorflow/tensorflow/python/kernel_tests/signal/
Dwindow_ops_test.py91 np_dtype = tf_dtype.as_numpy_dtype
93 symmetric=not periodic).astype(np_dtype)
/external/tensorflow/tensorflow/compiler/tests/
Dunary_ops_test.py961 for np_dtype in [np.int32, np.int64]:
964 np.array([1, 2, 0], np_dtype),
965 expected=np.array([2, 0, 1], dtype=np_dtype))
972 for np_dtype in [np.int32, np.int64]:
975 np.array([1, 2, 0], np_dtype),
976 expected=np.array([1, 2, 0], dtype=np_dtype))
/external/tensorflow/tensorflow/python/compiler/tensorrt/test/
Dtf_trt_integration_test_base.py988 np_dtype = spec.dtype.as_numpy_dtype()
991 scale = 10.0 if np.issubdtype(np_dtype, np.integer) else 1.0
997 data = (scale * np.random.random_sample(np_shape)).astype(np_dtype)
/external/tensorflow/tensorflow/python/ops/numpy_ops/
Dnp_array_ops.py1485 np_dtype = data.dtype.as_numpy_dtype
1486 if not np.issubdtype(np_dtype, np.integer):
1490 promoted_dtype = np.promote_types(np.int32, np_dtype)
/external/tensorflow/tensorflow/python/framework/
Dtensor_util_test.py652 for dtype, np_dtype in [(dtypes.complex64, np.complex64),
661 dtype=np_dtype),
/external/tensorflow/tensorflow/python/client/
Dsession_test.py1431 np_dtype = dtype.as_numpy_dtype
1441 np_array = np.sqrt(np_array.astype(np_dtype))
1443 np_array = np.sqrt(np_array.astype(np_dtype))
1445 np_array = np_array.astype(np_dtype)