/external/tensorflow/tensorflow/python/kernel_tests/ |
D | linalg_ops_test.py | 83 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 …]
|
D | self_adjoint_eig_op_test.py | 146 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
|
D | eig_op_test.py | 150 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
|
D | sparse_tensor_dense_matmul_op_test.py | 204 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))
|
D | sparse_add_op_test.py | 53 def _randomTensor(self, size, np_dtype, sparse=True): argument 55 x = np.random.randn(n, m).astype(np_dtype)
|
D | confusion_matrix_test.py | 81 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)
|
D | tensor_array_ops_test.py | 973 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)
|
D | array_ops_test.py | 362 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):
|
D | padding_fifo_queue_test.py | 1576 np_dtype = dtype.as_numpy_dtype 1581 np_array = np.sqrt(np_array.astype(np_dtype)) 1583 np_array = np_array.astype(np_dtype)
|
D | fifo_queue_test.py | 599 np_dtype = dtype.as_numpy_dtype 604 np_array = np.sqrt(np_array.astype(np_dtype)) 606 np_array = np_array.astype(np_dtype)
|
D | rnn_cell_test.py | 2578 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/ |
D | random_grad_test.py | 125 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/ |
D | audio_data.py | 95 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/ |
D | table_utils.py | 252 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/ |
D | window_ops_test.py | 91 np_dtype = tf_dtype.as_numpy_dtype 93 symmetric=not periodic).astype(np_dtype)
|
/external/tensorflow/tensorflow/compiler/tests/ |
D | unary_ops_test.py | 961 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/ |
D | tf_trt_integration_test_base.py | 988 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/ |
D | np_array_ops.py | 1485 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/ |
D | tensor_util_test.py | 652 for dtype, np_dtype in [(dtypes.complex64, np.complex64), 661 dtype=np_dtype),
|
/external/tensorflow/tensorflow/python/client/ |
D | session_test.py | 1431 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)
|