Home
last modified time | relevance | path

Searched refs:broadcast_shape (Results 1 – 25 of 42) sorted by relevance

12

/external/tensorflow/tensorflow/lite/kernels/internal/reference/
Dprocess_broadcast_shapes.h92 params->broadcast_shape[0] = 1; in ProcessBroadcastShapes()
93 params->broadcast_shape[1] = 1; in ProcessBroadcastShapes()
94 params->broadcast_shape[2] = 1; in ProcessBroadcastShapes()
95 params->broadcast_shape[3] = 1; in ProcessBroadcastShapes()
96 params->broadcast_shape[4] = 1; in ProcessBroadcastShapes()
100 params->broadcast_shape[4] *= shape_b->Dims(i); in ProcessBroadcastShapes()
106 params->broadcast_shape[3] *= shape_b->Dims(i); in ProcessBroadcastShapes()
110 params->broadcast_shape[2] *= shape_a->Dims(i); in ProcessBroadcastShapes()
115 params->broadcast_shape[1] *= shape_a->Dims(i); in ProcessBroadcastShapes()
119 params->broadcast_shape[0] *= shape_b->Dims(i); in ProcessBroadcastShapes()
Dadd.h362 int y0 = params.broadcast_shape[0]; in BroadcastAddFivefold()
363 int y1 = params.broadcast_shape[1]; in BroadcastAddFivefold()
364 int y2 = params.broadcast_shape[2]; in BroadcastAddFivefold()
365 int y3 = params.broadcast_shape[3]; in BroadcastAddFivefold()
366 int y4 = params.broadcast_shape[4]; in BroadcastAddFivefold()
/external/tensorflow/tensorflow/compiler/tf2xla/lib/
Dbroadcast.cc50 std::vector<int64> broadcast_shape; in BroadcastTo() local
63 broadcast_dims.push_back(broadcast_shape.size()); in BroadcastTo()
65 broadcast_shape.push_back(*output_it); in BroadcastTo()
70 broadcast_shape.push_back(*input_it); in BroadcastTo()
71 broadcast_shape.push_back(*output_it / *input_it); in BroadcastTo()
75 broadcast_shape.push_back(*output_it); in BroadcastTo()
81 int broadcast_shape_size = broadcast_shape.size(); in BroadcastTo()
85 absl::c_reverse(broadcast_shape); in BroadcastTo()
87 xla::BroadcastInDim(input, broadcast_shape, broadcast_dims); in BroadcastTo()
88 if (broadcast_shape != output_dims) { in BroadcastTo()
/external/tensorflow/tensorflow/python/ops/linalg/
Dlinear_operator_tridiag.py206 broadcast_shape = array_ops.broadcast_static_shape(
209 broadcast_shape = array_ops.broadcast_static_shape(
210 broadcast_shape,
212 d_shape = broadcast_shape.concatenate(self.diagonals[1].shape[-1])
222 broadcast_shape = array_ops.broadcast_dynamic_shape(
225 broadcast_shape = array_ops.broadcast_dynamic_shape(
226 broadcast_shape,
229 [broadcast_shape, [array_ops.shape(self.diagonals[1])[-1]]], axis=0)
308 broadcast_shape = array_ops.broadcast_dynamic_shape(
312 [broadcast_shape, rhs_shape[-2:]], axis=-1))
[all …]
Dlinear_operator_permutation.py208 broadcast_shape = array_ops.broadcast_dynamic_shape(
211 broadcast_x_shape = array_ops.concat([broadcast_shape, [k]], axis=-1)
213 perm = array_ops.broadcast_to(perm, broadcast_shape)
Dlinear_operator_kronecker.py254 batch_shape = common_shapes.broadcast_shape(
377 broadcast_batch_shape = common_shapes.broadcast_shape(
494 broadcast_batch_shape = common_shapes.broadcast_shape(
Dlinear_operator_composition.py208 batch_shape = common_shapes.broadcast_shape(
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dxla_broadcast_helper_op.cc81 std::vector<int64> broadcast_shape(max_rank_shape->dims(), 1LL); in Compile() local
85 context, dim >= 0 && dim < broadcast_shape.size(), in Compile()
90 broadcast_shape[dim] = min_rank_shape->dim_size(i); in Compile()
93 lhs = xla::BroadcastInDim(lhs, broadcast_shape, broadcast_dims); in Compile()
95 rhs = xla::BroadcastInDim(rhs, broadcast_shape, broadcast_dims); in Compile()
Dimage_resize_ops.cc220 xla::Shape broadcast_shape = broadcast_shape_or_status.ValueOrDie(); in BroadcastSpatialDimensions() local
223 broadcast_shape.set_dimensions(spatial_dimensions_offset + i, in BroadcastSpatialDimensions()
227 return xla::BroadcastInDim(input, broadcast_shape.dimensions(), in BroadcastSpatialDimensions()
/external/tensorflow/tensorflow/python/framework/
Dcommon_shapes_test.py44 common_shapes.broadcast_shape(shape1, shape2)
46 common_shapes.broadcast_shape(shape2, shape1)
58 expected, common_shapes.broadcast_shape(shape1, shape2))
60 expected, common_shapes.broadcast_shape(shape2, shape1))
62 self.assertEqual(expected, common_shapes.broadcast_shape(shape1, shape2))
63 self.assertEqual(expected, common_shapes.broadcast_shape(shape2, shape1))
133 actual_dims = common_shapes.broadcast_shape(shape1, shape2).dims
134 reflexive_actual_dims = common_shapes.broadcast_shape(shape2, shape1).dims
Dcommon_shapes.py89 def broadcast_shape(shape_x, shape_y): function
Dtensor_spec.py244 common_shapes.broadcast_shape(
252 common_shapes.broadcast_shape(
/external/tensorflow/tensorflow/python/ops/linalg/sparse/
Dconjugate_gradient.py109 broadcast_shape = array_ops.broadcast_dynamic_shape(
113 broadcast_shape = array_ops.broadcast_dynamic_shape(
114 broadcast_shape,
118 broadcast_shape, [array_ops.shape(rhs)[-1]]], axis=-1)
/external/tensorflow/tensorflow/lite/kernels/internal/optimized/integer_ops/
Dmul.h215 int y0 = params.broadcast_shape[0]; in BroadcastMulFivefold()
216 int y1 = params.broadcast_shape[1]; in BroadcastMulFivefold()
217 int y2 = params.broadcast_shape[2]; in BroadcastMulFivefold()
218 int y3 = params.broadcast_shape[3]; in BroadcastMulFivefold()
219 int y4 = params.broadcast_shape[4]; in BroadcastMulFivefold()
Dadd.h275 int y0 = params.broadcast_shape[0]; in BroadcastAddFivefold()
276 int y1 = params.broadcast_shape[1]; in BroadcastAddFivefold()
277 int y2 = params.broadcast_shape[2]; in BroadcastAddFivefold()
278 int y3 = params.broadcast_shape[3]; in BroadcastAddFivefold()
279 int y4 = params.broadcast_shape[4]; in BroadcastAddFivefold()
/external/tensorflow/tensorflow/python/ops/distributions/
Duniform.py189 broadcast_shape = array_ops.broadcast_dynamic_shape(
191 zeros = array_ops.zeros(broadcast_shape, dtype=self.dtype)
192 ones = array_ops.ones(broadcast_shape, dtype=self.dtype)
Dbijector_impl.py1056 broadcast_shape = array_ops.broadcast_static_shape(ildj.shape, y_shape)
1058 broadcast_shape[: broadcast_shape.ndims - (
/external/tensorflow/tensorflow/core/kernels/rnn/
Dgru_ops.h96 Eigen::array<Eigen::DenseIndex, 2> broadcast_shape({batch_size_, 1}); in operator()
98 r_u_bar.device(d) += b_ru.reshape(b_ru_shape).broadcast(broadcast_shape); in operator()
116 c.device(d) += (b_c.reshape(b_c_shape).broadcast(broadcast_shape)); in operator()
Dlstm_ops.h97 Eigen::array<Eigen::DenseIndex, 2> broadcast_shape({1, m.dimensions()[1]}); in operator()
100 m.device(d) = m * mask.reshape(m_shape).broadcast(broadcast_shape); in operator()
/external/tensorflow/tensorflow/python/kernel_tests/random/
Drandom_binomial_test.py167 broadcast_shape = counts.shape
175 return np.reshape(moments, broadcast_shape)
/external/tensorflow/tensorflow/python/keras/layers/
Dnormalization.py715 broadcast_shape = [1] * ndims
716 broadcast_shape[self.axis[0]] = input_shape.dims[self.axis[0]].value
720 return array_ops.reshape(v, broadcast_shape)
1071 broadcast_shape = [1] * ndims
1073 broadcast_shape[dim] = input_shape.dims[dim].value
1077 return array_ops.reshape(v, broadcast_shape)
Dnormalization_test.py651 broadcast_shape = [batch_input_shape[i] if i in axis else 1
656 expected *= np.reshape(gamma, broadcast_shape)
657 expected += np.reshape(beta, broadcast_shape)
/external/tensorflow/tensorflow/python/ops/
Drandom_ops.py549 broadcast_shape = array_ops.broadcast_dynamic_shape(
551 alpha_broadcast = array_ops.broadcast_to(alpha, broadcast_shape)
Dclustering_ops.py478 broadcast_shape = array_ops.concat([
486 array_ops.reshape(count_updates, broadcast_shape),
490 learning_rate = array_ops.reshape(learning_rate, broadcast_shape)
Darray_grad.py1127 broadcast_shape = op.inputs[1]
1132broadcast_shape.graph._c_graph, broadcast_shape._as_tf_output())) # pylint: disable=protected-acc…
1134 broadcast_shape = constant_op.constant(
1137 broadcast_shape, input_value_shape)

12