Home
last modified time | relevance | path

Searched refs:expand_dims (Results 1 – 25 of 155) sorted by relevance

1234567

/external/tensorflow/tensorflow/core/api_def/base_api/
Dapi_def_ExpandDims.pbtxt28 channels]`, you can make it a batch of 1 image with `expand_dims(image, 0)`,
35 shape(expand_dims(t, 0)) ==> [1, 2]
36 shape(expand_dims(t, 1)) ==> [2, 1]
37 shape(expand_dims(t, -1)) ==> [2, 1]
40 shape(expand_dims(t2, 0)) ==> [1, 2, 3, 5]
41 shape(expand_dims(t2, 2)) ==> [2, 3, 1, 5]
42 shape(expand_dims(t2, 3)) ==> [2, 3, 5, 1]
/external/tensorflow/tensorflow/tools/compatibility/testdata/
Dtest_file_v0_11.py99 tf.expand_dims([[1, 2], [3, 4]], axis=1).eval(),
125 self.assertAllEqual(tf.expand_dims(tf.squeeze(a, [0]), 0).eval(),
127 self.assertAllEqual(tf.squeeze(tf.expand_dims(a, 1), [1]).eval(),
130 tf.expand_dims(tf.squeeze([[1, 2, 3]], axis=[0]), dim=0).eval(), a)
132 tf.squeeze(tf.expand_dims([[1, 2, 3]], dim=1), axis=[1]).eval(), a)
135 tf.squeeze(tf.expand_dims([[1, 2, 3]], dim=1), axis=[1]).eval(), a)
166 batched_mat = tf.expand_dims(mat, [0])
169 self.assertAllEqual(result_batched, np.expand_dims(result, 0))
/external/tensorflow/tensorflow/python/kernel_tests/
Dconv1d_test.py39 x = array_ops.expand_dims(x, 0) # Add batch dimension
40 x = array_ops.expand_dims(x, 2) # And depth dimension
42 filters = array_ops.expand_dims(filters, 1) # in_channels
43 filters = array_ops.expand_dims(filters, 2) # out_channels
Dattention_ops_test.py60 array_ops.expand_dims(array_ops.expand_dims(t_rows, 0), 3),
74 array_ops.expand_dims(array_ops.expand_dims(t_cols, 0), 3),
Dnormalize_op_test.py43 norm = np.expand_dims(norm, d)
46 norm = np.expand_dims(norm, d)
54 return x / np.expand_dims(norm, axis)
Dshape_ops_test.py178 np_ans = np.expand_dims(x, axis=dim)
180 tensor = array_ops.expand_dims(x, dim)
235 self.assertRaises(ValueError, array_ops.expand_dims,
237 self.assertRaises(ValueError, array_ops.expand_dims,
239 self.assertRaises(ValueError, array_ops.expand_dims,
241 self.assertRaises(ValueError, array_ops.expand_dims,
249 squeezed = array_ops.expand_dims(inp, 1)
259 self.assertAllEqual([7], array_ops.expand_dims(inp, 0).eval())
260 self.assertAllEqual([7], array_ops.expand_dims(inp, -1).eval())
263 self.assertAllEqual([True], array_ops.expand_dims(inp, 0).eval())
[all …]
Ddraw_bounding_box_op_test.py87 bboxes = array_ops.expand_dims(bboxes, 0)
90 image = array_ops.expand_dims(image, 0)
Daggregate_ops_test.py67 [np.expand_dims(d, 0) for d in data]), axis=0)
80 expected = np.sum(np.vstack([np.expand_dims(data, 0)] * count),
Dmatrix_square_root_op_test.py52 [np.expand_dims(matrix1, 0),
53 np.expand_dims(matrix2, 0)])
/external/tensorflow/tensorflow/python/keras/utils/
Dkernelized_utils.py32 return array_ops.expand_dims(u, 0)
48 array_ops.expand_dims(x_matrix, 1), [1, y_shape[0], 1])
50 array_ops.expand_dims(y_matrix, 0), [x_shape[0], 1, 1])
Dmetrics_utils.py371 predictions_extra_dim = array_ops.expand_dims(y_pred, 0)
372 labels_extra_dim = array_ops.expand_dims(
413 label_weights = array_ops.expand_dims(label_weights, 0)
522 mask = array_ops.expand_dims(tmp, -1)
529 flat_values.append(array_ops.expand_dims(tmp, -1))
/external/tensorflow/tensorflow/python/ops/
Dctc_ops.py494 array_ops.expand_dims(indices, 0), [batch_size, 1, 1])
495 batch_idx = array_ops.expand_dims(math_ops.range(batch_size), 1) * [1, 0, 0]
496 indices += array_ops.expand_dims(batch_idx, 1)
502 return array_ops.expand_dims(trans, 0) + label_to_label
552 one_hot = array_ops.expand_dims(one_hot, axis=0)
553 ilabel_log_probs = array_ops.expand_dims(ilabel_log_probs, axis=2)
572 one_hot = array_ops.expand_dims(one_hot, axis=0)
573 label_states = array_ops.expand_dims(label_states, axis=3)
597 indices = unique_y + array_ops.expand_dims(batch_offset, axis=-1)
1081 indices=array_ops.expand_dims(
[all …]
Dinit_ops.py654 array_ops.expand_dims(q, 0), shape)
658 array_ops.expand_dims(q, 0), shape)
662 array_ops.expand_dims(q, 0), shape)
865 return array_ops.expand_dims(array_ops.expand_dims(orth, 0), 0)
993 return array_ops.expand_dims(orth, 0)
1149 return array_ops.expand_dims(
1150 array_ops.expand_dims(array_ops.expand_dims(orth, 0), 0), 0)
Dweights_broadcast_ops.py36 values_shape_2d = array_ops.expand_dims(values_shape, -1)
39 weights_shape_2d = array_ops.expand_dims(weights_shape, -1)
Dnn_grad.py512 vec = array_ops.expand_dims(vec, -1)
543 array_ops.expand_dims(grad_grad, 1),
544 array_ops.expand_dims(softmax, 2)),
1101 array_ops.expand_dims(
1111 array_ops.expand_dims(ind, -1), array_ops.reshape(grad, [-1]),
1136 math_ops.equal(array_ops.expand_dims(output, -1), input), grad.dtype)
1138 grad = array_ops.expand_dims(grad, -1)
1139 num_selected = array_ops.expand_dims(math_ops.reduce_sum(indicators, -1), -1)
/external/tensorflow/tensorflow/lite/kernels/
Dexpand_dims.cc30 namespace expand_dims { namespace
113 static TfLiteRegistration r = {nullptr, nullptr, expand_dims::Prepare, in Register_EXPAND_DIMS()
114 expand_dims::Eval}; in Register_EXPAND_DIMS()
/external/tensorflow/tensorflow/python/keras/layers/
Ddense_attention.py147 v_mask = array_ops.expand_dims(v_mask, axis=-2)
165 q_mask = array_ops.expand_dims(q_mask, axis=-1)
473 q_reshaped = array_ops.expand_dims(query, axis=-2)
475 k_reshaped = array_ops.expand_dims(key, axis=-3)
Dmerge.py134 x = array_ops.expand_dims(x, axis=1)
148 array_ops.expand_dims(batch_size, axis=-1)])
173 array_ops.expand_dims(batch_size, axis=-1), y_shape[:y_ndim - 1]
216 masks = [array_ops.expand_dims(m, axis=0) for m in mask if m is not None]
560 masks.append(array_ops.expand_dims(mask_i, axis=-1))
/external/tensorflow/tensorflow/examples/wav_to_spectrogram/
Dwav_to_spectrogram.cc69 Output expand_dims = in WavToSpectrogram() local
71 Output squeeze = Squeeze(root.WithOpName("squeeze"), expand_dims, in WavToSpectrogram()
/external/tensorflow/tensorflow/compiler/tests/
Dmatrix_inverse_op_test.py57 [np.expand_dims(matrix1, 0),
58 np.expand_dims(matrix2, 0)])
/external/tensorflow/tensorflow/lite/testing/nnapi_tflite_zip_tests/
Dnot_supported.txt133 expand_dims/expand_dims_axis_value=0,constant_axis=True,input_shape=[5,4],input_type=tf.float32
134 expand_dims/expand_dims_axis_value=1,constant_axis=True,input_shape=[5,4],input_type=tf.float32
135 expand_dims/expand_dims_axis_value=2,constant_axis=True,input_shape=[5,4],input_type=tf.float32
136 expand_dims/expand_dims_axis_value=-1,constant_axis=True,input_shape=[5,4],input_type=tf.float32
137 expand_dims/expand_dims_axis_value=-2,constant_axis=True,input_shape=[5,4],input_type=tf.float32
138 expand_dims/expand_dims_axis_value=-3,constant_axis=True,input_shape=[5,4],input_type=tf.float32
139 expand_dims/expand_dims_axis_value=0,constant_axis=False,input_shape=[5,4],input_type=tf.float32
140 expand_dims/expand_dims_axis_value=1,constant_axis=False,input_shape=[5,4],input_type=tf.float32
141 expand_dims/expand_dims_axis_value=2,constant_axis=False,input_shape=[5,4],input_type=tf.float32
142 expand_dims/expand_dims_axis_value=-1,constant_axis=False,input_shape=[5,4],input_type=tf.float32
[all …]
/external/tensorflow/tensorflow/python/ops/ragged/
Dragged_where_op.py154 array_ops.expand_dims(selected_rows, 1),
155 array_ops.expand_dims(selected_cols, 1), selected_coords[:, 1:]
/external/tensorflow/tensorflow/examples/speech_commands/
Dinput_data.py435 'spectrogram', tf.expand_dims(spectrogram, -1), max_outputs=1)
446 input=tf.expand_dims(spectrogram, -1),
460 'mfcc', tf.expand_dims(self.output_, -1), max_outputs=1)
484 tf.expand_dims(tf.expand_dims(self.output_, -1), 0),
/external/tensorflow/tensorflow/python/kernel_tests/signal/
Dshape_ops_test.py41 tensor = array_ops.expand_dims(tensor, 0)
48 expected = np.expand_dims(expected, axis=0)
54 tensor = array_ops.expand_dims(tensor, 0)
63 expected = np.expand_dims(expected, axis=0)
/external/tensorflow/tensorflow/python/ops/signal/
Ddct_ops.py141 _array_ops.expand_dims(n1, 0), [[0, axis_dim - 1]],
153 _array_ops.expand_dims(n1, 0), [[0, axis_dim - 1]],

1234567