Home
last modified time | relevance | path

Searched refs:params_shape (Results 1 – 20 of 20) sorted by relevance

/external/tensorflow/tensorflow/python/ops/ragged/
Dragged_batch_gather_with_default_op.py121 params_shape = array_ops.shape(params)
123 params_shape[:num_batch_dimensions],
125 params_shape[num_batch_dimensions + 1:params.shape.ndims]
127 upper_bounds = params_shape[num_batch_dimensions]
150 params_shape = ragged_tensor_shape.RaggedTensorDynamicShape.from_tensor(
157 if params_shape.num_inner_dimensions == 0:
158 pad_dims = params_shape.partitioned_dim_sizes[:-1] + (
159 array_ops.ones_like(params_shape.partitioned_dim_sizes[-1]),)
164 params_shape.partitioned_dim_sizes,
165 array_ops.concat([params_shape.inner_dim_sizes[:-1], [1]], axis=0))
[all …]
/external/tensorflow/tensorflow/core/kernels/
Dscatter_nd_op.cc271 TensorShape params_shape; in DoCompute() local
278 params_shape = params.shape(); in DoCompute()
281 params_shape = params.shape(); in DoCompute()
287 params_shape = c->input(0).shape(); in DoCompute()
288 if (!c->forward_input_to_output_with_shape(0, 0, params_shape, in DoCompute()
292 OP_REQUIRES_OK(c, c->allocate_output(0, params_shape, &params_ptr)); in DoCompute()
304 c, indices, updates, params_shape, &params, false /*allocate*/)); in DoCompute()
518 Status ValidateUpdateShape(const TensorShape& params_shape, in ValidateUpdateShape() argument
530 ", params_shape: ", params_shape.DebugString(), in ValidateUpdateShape()
535 if (params_shape.dims() < slice_dim + (updates.dims() - batch_dim)) { in ValidateUpdateShape()
[all …]
Dgather_nd_op.cc123 const TensorShape& params_shape(params.shape()); in DoGatherNd() local
124 Index total_nd = params_shape.dims(); in DoGatherNd()
131 slice_size_big *= params_shape.dim_size(i); in DoGatherNd()
132 result_shape.AddDim(params_shape.dim_size(i)); in DoGatherNd()
147 if (params_shape.num_elements() == 0) { in DoGatherNd()
151 params_shape.DebugString()); in DoGatherNd()
Dcudnn_rnn_ops.cc1802 const TensorShape& params_shape, in AllocateOutputs() argument
1821 context->allocate_output(3, params_shape, params_backprop)); in AllocateOutputs()
/external/tensorflow/tensorflow/contrib/layers/python/layers/
Dnormalization.py117 params_shape = inputs_shape[reduction_axis:reduction_axis + 1]
118 if not params_shape.is_fully_defined():
120 inputs.name, params_shape))
133 shape=params_shape,
146 shape=params_shape,
324 params_shape = [channels]
337 shape=params_shape,
350 shape=params_shape,
Dlayers.py287 params_shape = inputs_shape[-1:]
289 params_shape = inputs_shape[1:2]
290 if not params_shape.is_fully_defined():
292 (inputs.name, params_shape))
311 shape=params_shape,
318 beta = array_ops.constant(0.0, dtype=variable_dtype, shape=params_shape)
327 shape=params_shape,
334 gamma = array_ops.constant(1.0, dtype=variable_dtype, shape=params_shape)
350 shape=params_shape,
361 shape=params_shape,
[all …]
Dembedding_ops.py848 params_shape = array_ops.shape(params[0])
855 params_shape, [1], [-1])
/external/tensorflow/tensorflow/python/kernel_tests/
Dgather_op_test.py342 params_shape=[2, 3, 4, 5, 6, 7],
350 params_shape=[2, 3, 4, 5, 6, 7],
358 params_shape=[2, 3, 4, 5, 6, 7],
366 params_shape=[2, 3, 4, 5, 6, 7],
374 params_shape=[2, 3, 4, 5, 6, 7],
382 params_shape=[2, 3, 4, 5, 6, 7],
390 params_shape=[2, 3, 4, 5, 6, 7],
398 params_shape=[2, 3, 4, 5, 6, 7],
407 def testBatchDimsMatchesPythonBatching(self, params_shape, indices_shape, argument
411 params_size = np.prod(params_shape)
[all …]
Dresource_variable_ops_test.py1169 params_shape=[2, 3, 4, 5, 6, 7],
1176 params_shape=[2, 3, 4, 5, 6, 7],
1183 params_shape=[2, 3, 4, 5, 6, 7],
1190 params_shape=[2, 3, 4, 5, 6, 7],
1197 params_shape=[2, 3, 4, 5, 6, 7],
1205 def testGatherWithBatchDimsMatchesTensor(self, params_shape, indices_shape, argument
1209 params_size = np.prod(params_shape)
1210 params = np.reshape(np.arange(params_size, dtype=np.int32), params_shape)
1216 indices = indices % params_shape[batch_dims]
Dembedding_ops_test.py552 for params_shape in (12,), (6, 3):
553 params = np.random.randn(*params_shape)
573 for params_shape in (12,), (6, 3), (6, 2, 3):
576 params = 2 * np.ones(params_shape)
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dgather_op.cc206 TensorShape params_shape = context->InputShape(0); in Compile() local
208 OP_REQUIRES(context, TensorShapeUtils::IsVectorOrHigher(params_shape), in Compile()
215 context, num_index_dims <= params_shape.dims(), in Compile()
219 params_shape.dims())); in Compile()
225 OP_REQUIRES_OK(context, XlaGather(params, params_shape, indices, in Compile()
/external/tensorflow/tensorflow/core/ops/
Dcudnn_rnn_ops.cc225 auto params_shape = c->input(3); in __anon3a5366b80602() local
229 c->set_output(3, params_shape); in __anon3a5366b80602()
262 auto params_shape = c->input(3); in __anon3a5366b80702() local
266 c->set_output(3, params_shape); in __anon3a5366b80702()
301 auto params_shape = c->input(3); in __anon3a5366b80802() local
305 c->set_output(3, params_shape); in __anon3a5366b80802()
Darray_ops.cc1118 ShapeHandle params_shape; in __anondb9326b21802() local
1119 TF_RETURN_IF_ERROR(c->WithRankAtLeast(c->input(0), 1, &params_shape)); in __anondb9326b21802()
1129 if (c->RankKnown(params_shape) && c->RankKnown(indices_shape)) { in __anondb9326b21802()
1130 c->set_output(0, c->UnknownShapeOfRank(c->Rank(params_shape) + in __anondb9326b21802()
1149 params_shape, axis < 0 ? -axis : axis + 1, &unused)); in __anondb9326b21802()
1153 c->Subshape(params_shape, 0, axis, &params_outer_subshape)); in __anondb9326b21802()
1166 c->Subshape(params_shape, axis + 1, &params_inner_subshape)); in __anondb9326b21802()
/external/tensorflow/tensorflow/python/ops/
Darray_grad.py402 params_shape = array_ops.shape(params, out_type=ops.dtypes.int64)
403 params_shape = math_ops.cast(params_shape, dtypes.int32)
408 values_shape = array_ops.concat([size, params_shape[1:]], 0)
411 return [ops.IndexedSlices(values, indices, params_shape), None]
425 params_shape = array_ops.shape(params, out_type=ops.dtypes.int64)
426 params_shape = math_ops.cast(params_shape, dtypes.int32)
436 params_tail_shape = params_shape.cpu()[1:]
438 params_tail_shape = params_shape[1:]
442 return [ops.IndexedSlices(values, indices, params_shape), None, None]
444 outer_shape = params_shape[:axis]
[all …]
Dembedding_ops.py230 params_shape = array_ops.shape(params[0])
231 element_shape_d = params_shape[1:]
Dresource_variable_ops.py1514 params_shape = variable_shape(handle)
1516 values_shape = array_ops.concat([size, params_shape[1:]], 0)
1519 return (ops.IndexedSlices(values, indices, params_shape), None)
Darray_ops.py3493 params_shape = shape(params)
3498 casted_params_shape = gen_math_ops.cast(params_shape, indices_dtype)
3511 outer_shape = params_shape[batch_dims + 1:]
3512 flat_inner_shape = gen_math_ops.prod(params_shape[:batch_dims + 1], [0],
/external/tensorflow/tensorflow/contrib/gan/python/features/python/
Dvirtual_batchnorm_impl.py209 params_shape = self._reference_batch.shape[axis]
235 shape=(params_shape,),
242 shape=(params_shape,),
/external/tensorflow/tensorflow/python/ops/distributions/
Dcategorical.py54 params_shape = array_ops.shape(params)[:-1]
55 event *= array_ops.ones(params_shape, dtype=event.dtype)
/external/tensorflow/tensorflow/lite/kernels/internal/reference/
Dreference_ops.h2973 inline void GatherNd(const RuntimeShape& params_shape, in GatherNd() argument
2984 const int params_dims = params_shape.DimensionsCount(); in GatherNd()
2989 slice_size *= params_shape.Dims(i); in GatherNd()
2992 int remain_flat_size = params_shape.FlatSize(); in GatherNd()
2995 dims_to_count[i] = remain_flat_size / params_shape.Dims(i); in GatherNd()