Home
last modified time | relevance | path

Searched refs:newaxis (Results 1 – 25 of 68) sorted by relevance

123

/external/tensorflow/tensorflow/lite/testing/op_tests/
Dstrided_slice_np_style.py37 [tf.newaxis,
38 slice(3, 7, 1), tf.newaxis,
45 "spec": [[slice(3, 7, 2)], [tf.newaxis, slice(None)]],
96 "spec": [[tf.newaxis, # new_axis before ellipsis
99 [tf.newaxis, # new_axis after (and before) ellipsis
101 slice(None), Ellipsis, tf.newaxis]],
/external/tensorflow/tensorflow/python/ops/distributions/
Dmultinomial.py207 self._mean_val = self._total_count[..., array_ops.newaxis] * self._probs
254 n_draws[..., array_ops.newaxis], dtype=self.logits.dtype) * self.logits
263 x = random_ops.multinomial(logits[array_ops.newaxis, ...], n_draw,
296 self.total_count)[..., array_ops.newaxis]
298 -math_ops.matmul(self._mean_val[..., array_ops.newaxis],
299 p[..., array_ops.newaxis, :]), # outer product
304 self.total_count)[..., array_ops.newaxis]
Ddirichlet.py268 return self.concentration / self.total_concentration[..., array_ops.newaxis]
273 -math_ops.matmul(x[..., array_ops.newaxis],
274 x[..., array_ops.newaxis, :]), # outer prod
284 return math_ops.rsqrt(1. + self.total_concentration[..., array_ops.newaxis])
294 self.total_concentration[..., array_ops.newaxis] - k)
Ddirichlet_multinomial.py295 self.total_concentration[..., array_ops.newaxis])
318 -math_ops.matmul(x[..., array_ops.newaxis],
319 x[..., array_ops.newaxis, :]), # outer prod
331 c0 = self.total_concentration[..., array_ops.newaxis]
/external/tensorflow/tensorflow/python/ops/linalg/
Dlinear_operator_kronecker.py344 output = output[array_ops.newaxis, ...]
461 output = output[array_ops.newaxis, ...]
518 diag_part = diag_part[..., :, array_ops.newaxis]
519 op_diag_part = operator.diag_part()[..., array_ops.newaxis, :]
538 ..., :, array_ops.newaxis, :, array_ops.newaxis]
541 ..., array_ops.newaxis, :, array_ops.newaxis, :]
564 product = product[..., array_ops.newaxis]
566 product = product * eigval[..., array_ops.newaxis, :]
Dlinear_operator_householder.py214 mat = normalized_axis[..., array_ops.newaxis]
245 mat = normalized_axis[..., array_ops.newaxis]
Dlinear_operator_block_diag.py420 x_mat = [block[..., array_ops.newaxis] for block in x]
429 x_mat = x[..., array_ops.newaxis]
616 diag_list += [operator.diag_part()[..., array_ops.newaxis]]
670 eig_list += [operator.eigvals()[..., array_ops.newaxis]]
Dlinear_operator_block_lower_triangular.py560 x_mat = [block[..., array_ops.newaxis] for block in x]
569 x_mat = x[..., array_ops.newaxis]
829 diag_list.append(op.diag_part()[..., array_ops.newaxis])
872 eig_list.append(op.eigvals()[..., array_ops.newaxis])
/external/tensorflow/tensorflow/compiler/tests/
Dimage_ops_test.py425 out = sess.run(resized, {image: image_np[np.newaxis, :, :, np.newaxis]})
428 expected[np.newaxis, :, :, np.newaxis], out, rtol=2e-4, atol=2e-4)
430 self.assertAllClose(expected[np.newaxis, :, :, np.newaxis], out)
564 out = sess.run(resized, {image: image_np[np.newaxis, :, :, np.newaxis]})
567 expected[np.newaxis, :, :, np.newaxis], out, rtol=0.1, atol=0.01)
569 self.assertAllClose(expected[np.newaxis, :, :, np.newaxis], out)
648 out = sess.run(resized, {grads: grads_np[np.newaxis, :, :, np.newaxis]})
651 expected[np.newaxis, :, :, np.newaxis], out, rtol=0.1, atol=0.01)
654 expected[np.newaxis, :, :, np.newaxis], out)
725 out = sess.run(resized, {image: image_np[np.newaxis, :, :, np.newaxis]})
[all …]
Dgather_nd_op_test.py114 np.vstack((params[np.newaxis, :], params[np.newaxis, :])),
/external/tensorflow/tensorflow/python/ops/linalg/sparse/
Dconjugate_gradient.py91 x[..., array_ops.newaxis],
97 x = state.x + alpha[..., array_ops.newaxis] * state.p
98 r = state.r - alpha[..., array_ops.newaxis] * z
105 p = q + beta[..., array_ops.newaxis] * state.p
/external/tensorflow/tensorflow/python/ops/ragged/
Dragged_getitem_test.py219 (SLICE_BUILDER[array_ops.newaxis, :], [EXAMPLE_RAGGED_TENSOR_2D]),
220 (SLICE_BUILDER[:, array_ops.newaxis],
355 (SLICE_BUILDER[array_ops.newaxis, :], [EXAMPLE_RAGGED_TENSOR_4D]),
356 (SLICE_BUILDER[:, array_ops.newaxis],
484 rt_newaxis0 = rt[array_ops.newaxis]
485 rt_newaxis1 = rt[:, array_ops.newaxis]
486 rt_newaxis2 = rt[:, :, array_ops.newaxis]
487 rt_newaxis3 = rt[:, :, :, array_ops.newaxis]
488 rt_newaxis4 = rt[:, :, :, :, array_ops.newaxis]
Dragged_getitem.py135 if row_key is array_ops.newaxis:
258 if column_key is array_ops.newaxis:
383 num_indices = sum(1 for idx in key_list if idx is not array_ops.newaxis)
/external/tensorflow/tensorflow/python/kernel_tests/linalg/
Dlinear_operator_kronecker_test.py42 product = product[..., array_ops.newaxis, :, array_ops.newaxis]
43 factor_to_mul = factor[..., array_ops.newaxis, :, array_ops.newaxis, :]
/external/tensorflow/tensorflow/python/kernel_tests/
Dctc_decoder_ops_test.py144 ], np.float32)[:, np.newaxis]
198 input_prob_matrix_0[t, :][np.newaxis, :] for t in range(seq_len_0)
212 np.float32)[np.newaxis, :]
Darray_ops_test.py755 ones[array_ops.newaxis, :,
795 _ = checker[np.newaxis]
797 _ = checker[..., np.newaxis]
799 _ = checker[..., np.newaxis, :]
800 _ = checker[:, ..., np.newaxis, :, :]
802 _ = checker[:, :, np.newaxis, :, 2::-1]
804 _ = checker[np.newaxis, ..., np.newaxis]
825 _ = checker[np.newaxis, ..., np.newaxis]
829 _ = checker[np.newaxis, 1:]
896 self.tensorShapeEqual(a[3:5, :, array_ops.newaxis, 50:3,],
[all …]
/external/tensorflow/tensorflow/python/kernel_tests/signal/
Dreconstruction_ops_test.py47 powers = np.power(self.bases[:, np.newaxis], exponents[np.newaxis, :])
152 input_matrix = input_matrix[np.newaxis, :, :].astype(float)
/external/tensorflow/tensorflow/python/keras/applications/
Dimagenet_utils_test.py116 self.assertEqual(model.predict(x[np.newaxis])[0].shape, x.shape)
123 out1 = model1.predict(x[np.newaxis])[0]
131 out2 = model2.predict(x2[np.newaxis])[0]
/external/tensorflow/tensorflow/python/data/experimental/kernel_tests/serialization/
Dparallel_map_dataset_serialization_test.py48 np.arange(self._tensor_slice_len)[:, np.newaxis],
59 np.arange(self._tensor_slice_len)[:, np.newaxis],
Dunbatch_dataset_serialization_test.py37 np.array([[1, 2, 3]]) * np.arange(tensor_slice_len)[:, np.newaxis],
Dbatch_dataset_serialization_test.py40 np.array([[1, 2, 3]]) * np.arange(tensor_slice_len)[:, np.newaxis],
/external/tensorflow/tensorflow/python/kernel_tests/distributions/
Dmultinomial_test.py269 theta /= np.sum(theta, 1)[..., array_ops.newaxis]
276 x_centered = x - sample_mean[array_ops.newaxis, ...]
278 x_centered[..., array_ops.newaxis],
279 x_centered[..., array_ops.newaxis, :]), 0)
Ddirichlet_multinomial_test.py241 x_centered = x - sample_mean[array_ops.newaxis, ...]
243 x_centered[..., array_ops.newaxis],
244 x_centered[..., array_ops.newaxis, :]), 0)
339 ns * (ns + alpha_0) / (1 + alpha_0))[..., array_ops.newaxis]
/external/tensorflow/tensorflow/python/ops/numpy_ops/
D__init__.py172 from tensorflow.python.ops.array_ops import newaxis
/external/tensorflow/tensorflow/python/data/benchmarks/
Dbatch_benchmark.py38 indices=np.arange(non_zeros_per_row, dtype=np.int64)[:, np.newaxis],

123