Home
last modified time | relevance | path

Searched refs:get_shape (Results 1 – 25 of 465) sorted by relevance

12345678910>>...19

/external/tensorflow/tensorflow/contrib/image/python/ops/
Dimage_ops.py66 elif image_or_images.get_shape().ndims is None:
68 elif len(image_or_images.get_shape()) == 2:
70 elif len(image_or_images.get_shape()) == 3:
72 elif len(image_or_images.get_shape()) == 4:
85 if image_or_images.get_shape().ndims is None:
87 elif len(image_or_images.get_shape()) == 2:
89 elif len(image_or_images.get_shape()) == 3:
143 if len(angle_or_angles.get_shape()) == 0: # pylint: disable=g-explicit-length-test
145 elif len(angle_or_angles.get_shape()) == 1:
186 if translation_or_translations.get_shape().ndims is None:
[all …]
/external/tensorflow/tensorflow/contrib/grid_rnn/python/kernel_tests/
Dgrid_rnn_test.py47 self.assertEqual(g[0].get_shape(), (1, 2))
48 self.assertEqual(s[0].c.get_shape(), (1, 2))
49 self.assertEqual(s[0].h.get_shape(), (1, 2))
50 self.assertEqual(s[1].c.get_shape(), (1, 2))
51 self.assertEqual(s[1].h.get_shape(), (1, 2))
75 self.assertEqual(g2[0].get_shape(), (1, 2))
76 self.assertEqual(s2[0].c.get_shape(), (1, 2))
77 self.assertEqual(s2[0].h.get_shape(), (1, 2))
78 self.assertEqual(s2[1].c.get_shape(), (1, 2))
79 self.assertEqual(s2[1].h.get_shape(), (1, 2))
[all …]
/external/tensorflow/tensorflow/python/layers/
Dconvolutional_test.py70 self.assertListEqual(output.get_shape().as_list(),
72 self.assertListEqual(layer.kernel.get_shape().as_list(), [3, 3, 4, 32])
73 self.assertListEqual(layer.bias.get_shape().as_list(), [32])
79 self.assertListEqual(output.get_shape().as_list(),
87 self.assertListEqual(output.get_shape().as_list(),
89 self.assertListEqual(layer.kernel.get_shape().as_list(), [3, 3, 4, 32])
90 self.assertListEqual(layer.bias.get_shape().as_list(), [32])
97 self.assertListEqual(output.get_shape().as_list(),
99 self.assertListEqual(layer.kernel.get_shape().as_list(), [3, 3, 4, 32])
100 self.assertListEqual(layer.bias.get_shape().as_list(), [32])
[all …]
Dpooling_test.py58 self.assertListEqual(output.get_shape().as_list(), [5, 3, 4, 4])
65 self.assertListEqual(output.get_shape().as_list(), [5, 3, 4, 4])
74 self.assertListEqual(output.get_shape().as_list(), [5, 2, 6, 8])
84 self.assertListEqual(output.get_shape().as_list(), [3, 4, 4, 5])
95 self.assertListEqual(output.get_shape().as_list(), [None, 4, 4, 5])
103 self.assertListEqual(output.get_shape().as_list(),
112 self.assertListEqual(output.get_shape().as_list(),
122 self.assertListEqual(output.get_shape().as_list(),
132 self.assertListEqual(output.get_shape().as_list(),
140 self.assertListEqual(output.get_shape().as_list(), [5, 3, 3, 4, 4])
[all …]
/external/tensorflow/tensorflow/contrib/losses/python/losses/
Dloss_ops.py60 start_index = max(0, weights.get_shape().ndims)
61 reduction_indices = list(range(start_index, losses.get_shape().ndims))
132 if losses.get_shape().ndims is None:
134 weights_shape = weights.get_shape()
172 if weights.get_shape().ndims == 0:
185 if weights.get_shape().ndims >= 1:
186 reduction_indices = list(range(1, weights.get_shape().ndims))
193 array_ops.shape(losses), [weights.get_shape().ndims], [-1])
291 predictions.get_shape().assert_is_compatible_with(labels.get_shape())
336 logits.get_shape().assert_is_compatible_with(multi_class_labels.get_shape())
[all …]
/external/tensorflow/tensorflow/contrib/seq2seq/python/kernel_tests/
Dbasic_decoder_test.py92 step_outputs[0].get_shape())
93 self.assertEqual((batch_size,), step_outputs[1].get_shape())
94 self.assertEqual((batch_size, cell_depth), first_state[0].get_shape())
95 self.assertEqual((batch_size, cell_depth), first_state[1].get_shape())
96 self.assertEqual((batch_size, cell_depth), step_state[0].get_shape())
97 self.assertEqual((batch_size, cell_depth), step_state[1].get_shape())
170 self.assertEqual((batch_size, cell_depth), step_outputs[0].get_shape())
171 self.assertEqual((batch_size,), step_outputs[1].get_shape())
172 self.assertEqual((batch_size, cell_depth), first_state[0].get_shape())
173 self.assertEqual((batch_size, cell_depth), first_state[1].get_shape())
[all …]
/external/tensorflow/tensorflow/python/ops/
Dembedding_ops.py84 rank = ops.convert_to_tensor(x).get_shape().ndims
149 if np == 1 and (not transform_fn or ids.get_shape().ndims == 1):
172 dim_0_size = params[0].get_shape()[0]
174 dim_0_size += params[p].get_shape()[0]
180 if params[p].get_shape()[0].value is not None:
181 dim_0_sizes.append(params[p].get_shape()[0].value)
228 element_shape_s = params[0].get_shape()[1:]
230 element_shape_s = element_shape_s.merge_with(p.get_shape()[1:])
232 element_shape_s = ret.get_shape()[1:]
254 ret.set_shape(ids.get_shape().concatenate(element_shape_s))
[all …]
Dnn_ops.py98 input_shape = input.get_shape()
100 filter_shape = filter.get_shape()
352 input_shape = input.get_shape()
398 rate_shape = dilation_rate.get_shape().with_rank(1)
402 if not dilation_rate.get_shape().is_fully_defined():
569 fill_dims = orig.get_shape().as_list()[1:]
770 input_shape = input.get_shape()
772 filter_shape = filter.get_shape()
971 input.get_shape().with_rank(num_spatial_dims + 2)
1228 if not value.get_shape()[axis].is_compatible_with(filter.get_shape()[3]):
[all …]
/external/tensorflow/tensorflow/python/kernel_tests/
Dvariable_ops_test.py67 self.assertEqual([1, 2], p.get_shape())
69 self.assertEqual(tensor_shape.unknown_shape(), p.get_shape())
88 self.assertEqual(tensor_shape.unknown_shape(), var.get_shape())
95 self.assertEqual(tensor_shape.unknown_shape(), var.get_shape())
101 self.assertEqual(tensor_shape.unknown_shape(), tensor.get_shape())
109 self.assertEqual(shape, var.get_shape())
110 self.assertEqual(shape, assigned.get_shape())
116 self.assertEqual(shape, var.get_shape())
118 self.assertEqual(tensor_shape.unknown_shape(), assigned.get_shape())
124 self.assertEqual(tensor_shape.unknown_shape(), var.get_shape())
[all …]
Dsparse_concat_op_test.py146 self.assertEqual(sp_concat.indices.get_shape(), [4, 2])
147 self.assertEqual(sp_concat.values.get_shape(), [4])
148 self.assertEqual(sp_concat.dense_shape.get_shape(), [2])
168 self.assertEqual(sp_concat.indices.get_shape(), [8, 2])
169 self.assertEqual(sp_concat.values.get_shape(), [8])
170 self.assertEqual(sp_concat.dense_shape.get_shape(), [2])
194 self.assertEqual(sp_concat.indices.get_shape(), [7, 2])
195 self.assertEqual(sp_concat.values.get_shape(), [7])
196 self.assertEqual(sp_concat.dense_shape.get_shape(), [2])
219 self.assertEqual(sp_concat.indices.get_shape(), [10, 2])
[all …]
/external/tensorflow/tensorflow/contrib/distributions/python/kernel_tests/
Dgeometric_test.py68 self.assertEqual([6,], log_prob.get_shape())
72 self.assertEqual([6,], pmf.get_shape())
93 self.assertEqual([6,], log_prob.get_shape())
95 self.assertEqual([6,], pmf.get_shape())
107 self.assertEqual([6, 3], log_prob.get_shape())
112 self.assertEqual([6, 3], pmf.get_shape())
126 self.assertEqual([6, 3], cdf.get_shape())
134 self.assertEqual([3], geom.entropy().get_shape())
142 self.assertEqual([3], geom.mean().get_shape())
150 self.assertEqual([3], geom.variance().get_shape())
[all …]
Dbinomial_test.py55 self.assertEqual((2, 1), binom.total_count.get_shape())
62 self.assertEqual((1, 3), binom.probs.get_shape())
63 self.assertEqual((1, 3), binom.logits.get_shape())
70 self.assertEqual((1, 3), binom.probs.get_shape())
71 self.assertEqual((1, 3), binom.logits.get_shape())
128 self.assertEqual((), pmf.get_shape())
129 self.assertEqual((), cdf.get_shape())
141 self.assertEqual((), pmf.get_shape())
142 self.assertEqual((), cdf.get_shape())
153 self.assertEqual((1, 2), pmf.get_shape())
[all …]
Dpoisson_test.py62 self.assertEqual(log_pmf.get_shape(), (6,))
66 self.assertEqual(pmf.get_shape(), (6,))
88 self.assertEqual(log_pmf.get_shape(), (6,))
90 self.assertEqual(pmf.get_shape(), (6,))
101 self.assertEqual(log_pmf.get_shape(), (6, 3))
105 self.assertEqual(pmf.get_shape(), (6, 3))
117 self.assertEqual(log_cdf.get_shape(), (6,))
121 self.assertEqual(cdf.get_shape(), (6,))
133 self.assertEqual(log_cdf.get_shape(), (6, 3))
137 self.assertEqual(cdf.get_shape(), (6, 3))
[all …]
Ddeterministic_test.py70 self.assertAllEqual((2, 2), prob.get_shape())
80 self.assertAllEqual((2, 2), prob.get_shape())
90 self.assertAllEqual((2, 2), prob.get_shape())
100 self.assertAllEqual((2, 2), prob.get_shape())
112 self.assertAllEqual((2, 3), prob.get_shape())
122 self.assertAllEqual((2, 2), cdf.get_shape())
132 self.assertAllEqual((2, 2), cdf.get_shape())
142 self.assertAllEqual((2, 2), cdf.get_shape())
150 self.assertAllEqual(sample_shape, sample.get_shape())
159 self.assertAllEqual(sample_shape + (2,), sample.get_shape())
[all …]
/external/tensorflow/tensorflow/python/kernel_tests/distributions/
Dmultinomial_test.py58 self.assertEqual((2, 1), dist.total_count.get_shape())
65 self.assertEqual((1, 3), dist.probs.get_shape())
66 self.assertEqual((1, 3), dist.logits.get_shape())
74 self.assertEqual((1, 3), multinom.probs.get_shape())
75 self.assertEqual((1, 3), multinom.logits.get_shape())
129 self.assertEqual((), pmf.get_shape())
140 self.assertEqual((), pmf.get_shape())
148 self.assertEqual((2), pmf.get_shape())
156 self.assertEqual((2), pmf.get_shape())
164 self.assertEqual((2), pmf.get_shape())
[all …]
Dnormal_test.py108 log_pdf.get_shape())
111 self.assertAllEqual(normal.batch_shape, log_pdf.get_shape())
115 self.assertAllEqual(normal.batch_shape_tensor().eval(), pdf.get_shape())
117 self.assertAllEqual(normal.batch_shape, pdf.get_shape())
137 self.assertEqual(log_pdf.get_shape(), (6, 2))
139 log_pdf.get_shape())
142 self.assertAllEqual(normal.batch_shape, log_pdf.get_shape())
147 self.assertEqual(pdf.get_shape(), (6, 2))
148 self.assertAllEqual(normal.batch_shape_tensor().eval(), pdf.get_shape())
150 self.assertAllEqual(normal.batch_shape, pdf.get_shape())
[all …]
Ddirichlet_multinomial_test.py60 self.assertEqual([1, 1], dist.total_count.get_shape())
67 self.assertEqual([1, 3], dist.concentration.get_shape())
111 self.assertEqual((), pmf.get_shape())
123 self.assertEqual((), pmf.get_shape())
135 self.assertEqual((4, 3), pmf.get_shape())
146 self.assertAllEqual([2], pmf.get_shape())
156 self.assertAllEqual([2], pmf.get_shape())
166 self.assertAllEqual([2], pmf.get_shape())
176 self.assertAllEqual([2], pmf.get_shape())
288 self.assertEqual([2, 2], covariance.get_shape())
[all …]
Ddirichlet_test.py68 self.assertEqual([1, 3], dist.concentration.get_shape())
93 self.assertEqual((), pdf.get_shape())
102 self.assertEqual((), pdf.get_shape())
112 self.assertEqual((2), pdf.get_shape())
121 self.assertEqual((2), pdf.get_shape())
129 self.assertEqual((2), pdf.get_shape())
137 self.assertEqual((2), pdf.get_shape())
145 self.assertEqual((2), pdf.get_shape())
151 self.assertEqual(dirichlet.mean().get_shape(), [3])
198 self.assertEqual(dirichlet.covariance().get_shape(), (3, 3))
[all …]
Dgamma_test.py71 self.assertEqual(log_pdf.get_shape(), (6,))
73 self.assertEqual(pdf.get_shape(), (6,))
91 self.assertEqual(log_pdf.get_shape(), (6, 2))
94 self.assertEqual(pdf.get_shape(), (6, 2))
112 self.assertEqual(log_pdf.get_shape(), (6, 2))
115 self.assertEqual(pdf.get_shape(), (6, 2))
134 self.assertEqual(cdf.get_shape(), (6,))
145 self.assertEqual(gamma.mean().get_shape(), (3,))
157 self.assertEqual(gamma.mode().get_shape(), (3,))
181 self.assertEqual(gamma.mode().get_shape(), (3,))
[all …]
/external/tensorflow/tensorflow/contrib/slim/python/slim/nets/
Dvgg_test.py41 self.assertListEqual(logits.get_shape().as_list(),
52 self.assertListEqual(logits.get_shape().as_list(),
113 self.assertListEqual(logits.get_shape().as_list(),
116 self.assertListEqual(predictions.get_shape().as_list(), [batch_size])
128 self.assertListEqual(logits.get_shape().as_list(),
135 self.assertListEqual(logits.get_shape().as_list(),
139 self.assertEquals(predictions.get_shape().as_list(), [eval_batch_size])
162 self.assertListEqual(logits.get_shape().as_list(),
173 self.assertListEqual(logits.get_shape().as_list(),
247 self.assertListEqual(logits.get_shape().as_list(),
[all …]
Dinception_v3_test.py46 self.assertListEqual(logits.get_shape().as_list(),
49 self.assertListEqual(end_points['Predictions'].get_shape().as_list(),
59 self.assertListEqual(final_endpoint.get_shape().as_list(),
119 self.assertListEqual(end_points[endpoint_name].get_shape().as_list(),
141 self.assertListEqual(logits.get_shape().as_list(),
145 self.assertListEqual(aux_logits.get_shape().as_list(),
149 self.assertListEqual(pre_pool.get_shape().as_list(),
153 self.assertListEqual(pre_logits.get_shape().as_list(),
173 original_depth = end_points[key].get_shape().as_list()[3]
174 new_depth = end_points_with_multiplier[key].get_shape().as_list()[3]
[all …]
/external/tensorflow/tensorflow/python/keras/_impl/keras/
Dbackend_test.py300 self.assertEqual(x.get_shape().as_list(), [3, 4])
302 self.assertEqual(x.get_shape().as_list(), [3, 4])
311 self.assertEqual(xy.get_shape().as_list(), [2, 4])
316 self.assertEqual(xy.get_shape().as_list(), [32, 28, 4])
322 self.assertEqual(xy.get_shape().as_list(), [32, 1, 30])
423 self.assertEqual(y.get_shape().as_list(), [1, 2, 5])
442 self.assertEqual(y.get_shape().as_list(), [1, 4, 4, 3])
450 self.assertEqual(y.get_shape().as_list(), [1, 3, 4, 4])
470 self.assertEqual(y.get_shape().as_list(), [1, 4, 4, 4, 3])
479 self.assertEqual(y.get_shape().as_list(), [1, 3, 4, 4, 4])
[all …]
/external/tensorflow/tensorflow/contrib/layers/python/layers/
Dembedding_ops.py127 original_rank_dim = sparse_ids.dense_shape.get_shape()[0]
182 (original_rank_dim - 1).value).concatenate(result.get_shape()[1:]))
336 shape = params[p].get_shape()
480 embeds.set_shape(ids.get_shape().concatenate(
481 unique_embeddings.get_shape()[1:]))
631 sp_ids.values.get_shape().assert_is_compatible_with(
632 sp_weights.values.get_shape())
633 sp_ids.indices.get_shape().assert_is_compatible_with(
634 sp_weights.indices.get_shape())
635 sp_ids.dense_shape.get_shape().assert_is_compatible_with(
[all …]
/external/tensorflow/tensorflow/python/ops/losses/
Dlosses_impl.py259 predictions.get_shape().assert_is_compatible_with(labels.get_shape())
311 predictions.get_shape().assert_is_compatible_with(labels.get_shape())
351 logits.get_shape().assert_is_compatible_with(labels.get_shape())
415 predictions.get_shape().assert_is_compatible_with(labels.get_shape())
472 predictions.get_shape().assert_is_compatible_with(labels.get_shape())
538 predictions.get_shape().assert_is_compatible_with(labels.get_shape())
612 predictions.get_shape().assert_is_compatible_with(labels.get_shape())
664 logits.get_shape().assert_is_compatible_with(multi_class_labels.get_shape())
720 logits.get_shape().assert_is_compatible_with(onehot_labels.get_shape())
766 labels_rank = labels.get_shape().ndims
[all …]
/external/tensorflow/tensorflow/contrib/training/python/training/
Dsampling_ops.py205 target_probs.get_shape().assert_is_fully_defined()
207 labels, target_probs.get_shape().num_elements())
303 tensor_shape = tensor.get_shape().with_rank_at_least(1)
306 tensor_shape[0].assert_is_compatible_with(tensor_list[0].get_shape()[0])
317 probs.get_shape().assert_is_fully_defined()
320 probs.get_shape().assert_has_rank(1)
333 prob_length = checked_probs_list[0].get_shape().num_elements()
335 if checked_prob.get_shape().num_elements() != prob_length:
339 labels.get_shape().assert_has_rank(1)
343 tensor_shape = tensor.get_shape().with_rank_at_least(1)
[all …]

12345678910>>...19