Home
last modified time | relevance | path

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

/external/tensorflow/tensorflow/python/kernel_tests/
Dlinalg_ops_test.py81 for np_dtype, atol in [(np.float32, 0.05), (np.float64, 1e-5),
83 matrix = _RandomPDMatrix(n, self.rng, np_dtype)
94 for np_dtype, atol in [(np.float32, 0.05), (np.float64, 1e-5),
96 matrix = (np.eye(20) * 1e-6).astype(np_dtype)
111 for np_dtype, atol in [(np.float32, 0.05), (np.float64, 1e-5),
113 matrix = _RandomPDMatrix(n, self.rng, np_dtype)
122 for np_dtype, atol in [(np.float32, 0.05), (np.float64, 1e-5),
124 matrix = (np.eye(20) * 1e-6).astype(np_dtype)
Dself_adjoint_eig_op_test.py145 np_dtype = dtype_.as_numpy_dtype
147 low=-1.0, high=1.0, size=n * n).reshape([n, n]).astype(np_dtype)
150 low=-1.0, high=1.0, size=n * n).reshape([n, n]).astype(np_dtype)
190 np_dtype = dtype_.as_numpy_dtype
194 low=-1.0, high=1.0, size=n * n).reshape([n, n]).astype(np_dtype)
197 low=-1.0, high=1.0, size=n * n).reshape([n, n]).astype(np_dtype)
203 epsilon = np.finfo(np_dtype).eps
Dsparse_tensor_dense_matmul_op_test.py212 def _testLarge(self, np_dtype): argument
220 x = _maybe_complex(np.random.rand(m, k).astype(np_dtype))
223 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)
Darray_ops_test.py304 def _reverse1DimAuto(self, np_dtype): argument
305 x_np = np.array([1, 200, 3, 40, 5], dtype=np_dtype)
315 def _reverse2DimAuto(self, np_dtype): argument
316 x_np = np.array([[1, 200, 3], [4, 5, 60]], dtype=np_dtype)
461 def _compareDiffType(self, n, np_dtype, use_gpu): argument
465 x = np.linspace(-10, 10, 5).astype(np_dtype)
466 if np_dtype in (np.complex64, np.complex128):
Dtensor_array_ops_test.py923 np_dtype = dtype.as_numpy_dtype
952 v0 = array_ops.identity(np.arange(3 * 5, dtype=np_dtype).reshape(3, 5))
953 state0 = array_ops.identity(np.array([1] * 5, dtype=np_dtype))
954 init_val = np.arange(100, 105, dtype=np_dtype)
958 dtype=np_dtype,
962 grad_val = -np.arange(3 * 5, dtype=np_dtype).reshape(3, 5)
Dpadding_fifo_queue_test.py1510 np_dtype = dtype.as_numpy_dtype
1515 np_array = np.sqrt(np_array.astype(np_dtype))
1517 np_array = np_array.astype(np_dtype)
Dfifo_queue_test.py1396 np_dtype = dtype.as_numpy_dtype
1401 np_array = np.sqrt(np_array.astype(np_dtype))
1403 np_array = np_array.astype(np_dtype)
Drnn_cell_test.py2565 np_dtype = dtype.as_numpy_dtype
2608 [[0.240, 0.240]], dtype=np_dtype), 1e-2)
2611 dtype=np_dtype)
2622 x: np.array([[1., 1., 1.]], dtype=np_dtype),
2623 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.py91 np_dtype = '%s%d' % (sample_format_dict['dtype_str'],
95 np_array = np.fromstring(binary, dtype=np_dtype)
/external/tensorflow/tensorflow/python/kernel_tests/signal/
Dwindow_ops_test.py72 np_dtype = tf_dtype.as_numpy_dtype
74 symmetric=not periodic).astype(np_dtype)
/external/tensorflow/tensorflow/contrib/cudnn_rnn/python/kernel_tests/
Dcudnn_rnn_test.py172 np_dtype = np.float32 if self._dtype == dtypes.float32 else np.float64
174 input_size).astype(np_dtype)
176 num_units).astype(np_dtype)
179 num_units).astype(np_dtype)
190 np_dtype = np.float32 if self._dtype == dtypes.float32 else np.float64
192 num_units)).astype(np_dtype)
195 num_units)).astype(np_dtype)
/external/tensorflow/tensorflow/compiler/xla/python/
Dnumpy_bridge.cc132 PyArray_Descr* np_dtype = PyArray_DescrFromType(np_typenum); in PyShapeInfoFromXlaShape() local
152 return make_safe(PyTuple_Pack(2, np_dtype, dimensions.release())); in PyShapeInfoFromXlaShape()
/external/tensorflow/tensorflow/python/framework/
Dtensor_util_test.py624 for dtype, np_dtype in [(dtypes.complex64, np.complex64),
633 dtype=np_dtype),
/external/tensorflow/tensorflow/contrib/rnn/python/kernel_tests/
Drnn_cell_test.py129 np_dtype = dtype.as_numpy_dtype
188 x.name: np.array([[1., 1., 1.]], dtype=np_dtype),
189 state[0].name: 0.1 * np.ones([1, 2], dtype=np_dtype),
190 state[1].name: 0.1 * np.ones([1, 2], dtype=np_dtype),
/external/tensorflow/tensorflow/python/client/
Dsession_test.py1411 np_dtype = dtype.as_numpy_dtype
1421 np_array = np.sqrt(np_array.astype(np_dtype))
1423 np_array = np.sqrt(np_array.astype(np_dtype))
1425 np_array = np_array.astype(np_dtype)