Home
last modified time | relevance | path

Searched refs:np_type (Results 1 – 15 of 15) sorted by relevance

/external/tensorflow/tensorflow/python/kernel_tests/
Dmatrix_solve_op_test.py42 for np_type in [np.float32, np.float64, np.complex64, np.complex128]:
43 if np_type == np.float32 or np_type == np.complex64:
48 if np_type in (np.float32, np.float64):
49 a = x.real.astype(np_type)
50 b = y.real.astype(np_type)
53 a = x.astype(np_type)
54 b = y.astype(np_type)
63 a_ph = array_ops.placeholder(dtypes.as_dtype(np_type))
64 b_ph = array_ops.placeholder(dtypes.as_dtype(np_type))
Dmatrix_square_root_op_test.py35 def _verifySquareRoot(self, matrix, np_type): argument
36 matrix = matrix.astype(np_type)
45 for np_type in [np.float32, np.float64]:
46 self._verifySquareRoot(x, np_type)
49 for np_type in [np.complex64, np.complex128]:
50 self._verifySquareRoot(x, np_type)
Dmatrix_exponential_op_test.py52 def _verifyExponential(self, x, np_type): argument
53 inp = x.astype(np_type)
57 np_ans = np.empty(x.shape, dtype=np_type)
60 np_ans = np.zeros(inp.shape, dtype=np_type)
69 for np_type in [np.float32, np.float64]:
70 self._verifyExponential(x, np_type)
73 for np_type in [np.complex64, np.complex128]:
74 self._verifyExponential(x, np_type)
Dmatrix_inverse_op_test.py37 def _verifyInverse(self, x, np_type): argument
39 y = x.astype(np_type)
54 for np_type in [np.float32, np.float64]:
55 self._verifyInverse(x, np_type)
58 for np_type in [np.complex64, np.complex128]:
59 self._verifyInverse(x, np_type)
Dmatrix_logarithm_op_test.py41 def _verifyLogarithm(self, x, np_type): argument
42 inp = x.astype(np_type)
51 for np_type in [np.complex64, np.complex128]:
52 self._verifyLogarithm(x, np_type)
Dbanded_triangular_solve_op_test.py58 for np_type in dtypes:
59 a = x.astype(np_type)
60 b = y.astype(np_type)
Dmatrix_triangular_solve_op_test.py58 for np_type in dtypes:
59 a = x.astype(np_type)
60 b = y.astype(np_type)
Dlinalg_ops_test.py61 for np_type, atol in [(np.float32, 0.05), (np.float64, 1e-5)]:
66 _RandomPDMatrix(n, self.rng)]).astype(np_type)
69 with self.subTest(n=n, np_type=np_type, atol=atol, k=k):
70 rhs = self.rng.randn(2, n, k).astype(np_type)
Dembedding_ops_test.py163 np_type = "f" if dtype == dtypes.float32 else "d"
164 val = (np.random.rand(*shard_shape).astype(np_type)) + 1
/external/tensorflow/tensorflow/python/kernel_tests/signal/
Dfft_ops_test.py177 def test_empty(self, rank, extra_dims, np_type): argument
179 x = np.zeros((0,) * dims).astype(np_type)
186 def test_basic(self, rank, extra_dims, np_type): argument
191 tol = 1e-4 if np_type == np.complex64 else 1e-8
194 (4,) * dims).astype(np_type), rank, rtol=tol, atol=tol)
198 def test_large_batch(self, rank, extra_dims, np_type): argument
200 tol = 1e-4 if np_type == np.complex64 else 5e-5
203 (128,) * dims).astype(np_type), rank, rtol=tol, atol=tol)
217 def test_placeholder(self, rank, extra_dims, np_type): argument
220 tol = 1e-4 if np_type == np.complex64 else 1e-8
[all …]
/external/tensorflow/tensorflow/compiler/tests/
Dmatrix_solve_op_test.py33 for np_type in self.float_types & {np.float32, np.float64}:
34 tol = 1e-4 if np_type == np.float32 else 1e-12
35 a = x.astype(np_type)
36 b = y.astype(np_type)
Dmatrix_inverse_op_test.py33 def _verifyInverse(self, x, np_type): argument
35 y = x.astype(np_type)
52 for np_type in self.float_types & {np.float64, np.float32}:
53 self._verifyInverse(x, np_type)
/external/tensorflow/tensorflow/compiler/xla/python/
Dtypes.cc26 xla::StatusOr<PrimitiveType> DtypeToPrimitiveType(const py::dtype& np_type) { in DtypeToPrimitiveType() argument
45 auto it = types->find({np_type.kind(), np_type.itemsize()}); in DtypeToPrimitiveType()
47 return InvalidArgument("Unknown NumPy type %c size %d", np_type.kind(), in DtypeToPrimitiveType()
48 np_type.itemsize()); in DtypeToPrimitiveType()
Dtypes.h49 StatusOr<PrimitiveType> DtypeToPrimitiveType(const pybind11::dtype& np_type);
/external/tensorflow/tensorflow/python/eager/
Dtensor_test.py352 for np_type, dtype in [(np.int32, dtypes.int32),
355 x = ops.convert_to_tensor([np.array(65, dtype=np_type),
356 np.array(16, dtype=np_type)])