Home
last modified time | relevance | path

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

/external/tensorflow/tensorflow/python/ops/ragged/
Dragged_gather_op_test.py314 dict(params_shape=[3, 4], indices_shape=[], axis=0),
315 dict(params_shape=[3, 4], indices_shape=[5], axis=0),
316 dict(params_shape=[3, 4], indices_shape=[2, 5], axis=0),
318 dict(params_shape=[3, 4], indices_shape=[], axis=1),
319 dict(params_shape=[3, 4], indices_shape=[2], axis=1),
320 dict(params_shape=[3, 4], indices_shape=[2, 5], axis=1),
321 dict(params_shape=[7, 3, 1], indices_shape=[2, 4], axis=1),
322 dict(params_shape=[3, 4, 5, 6], indices_shape=[2, 1, 7], axis=1),
323 dict(params_shape=[7, 3, 5], indices_shape=[], axis=2),
324 dict(params_shape=[7, 3, 5], indices_shape=[2], axis=2),
[all …]
Dragged_batch_gather_with_default_op.py118 params_shape = array_ops.shape(params)
120 params_shape[:num_batch_dimensions],
122 params_shape[num_batch_dimensions + 1:params.shape.ndims]
124 upper_bounds = params_shape[num_batch_dimensions]
147 params_shape = ragged_tensor_shape.RaggedTensorDynamicShape.from_tensor(
154 if params_shape.num_inner_dimensions == 0:
155 pad_dims = params_shape.partitioned_dim_sizes[:-1] + (
156 array_ops.ones_like(params_shape.partitioned_dim_sizes[-1]),)
161 params_shape.partitioned_dim_sizes,
162 array_ops.concat([params_shape.inner_dim_sizes[:-1], [1]], axis=0))
[all …]
/external/tensorflow/tensorflow/core/kernels/
Dgather_nd_op.h90 const TensorShape& params_shape(params.shape()); in DoGatherNd()
91 Index total_nd = params_shape.dims(); in DoGatherNd()
98 slice_size_big *= params_shape.dim_size(i); in DoGatherNd()
99 result_shape.AddDim(params_shape.dim_size(i)); in DoGatherNd()
114 if (params_shape.num_elements() == 0) { in DoGatherNd()
118 params_shape.DebugString()); in DoGatherNd()
Dscatter_nd_op.cc278 TensorShape params_shape; in DoCompute() local
285 params_shape = params.shape(); in DoCompute()
288 params_shape = params.shape(); in DoCompute()
294 params_shape = c->input(0).shape(); in DoCompute()
295 if (!c->forward_input_to_output_with_shape(0, 0, params_shape, in DoCompute()
299 OP_REQUIRES_OK(c, c->allocate_output(0, params_shape, &params_ptr)); in DoCompute()
311 c, indices, updates, params_shape, &params, false /*allocate*/)); in DoCompute()
777 Status ValidateUpdateShape(const TensorShape& params_shape, in ValidateUpdateShape() argument
792 "Dimensions [", slice_dim, ",", params_shape.dims(), in ValidateUpdateShape()
793 ") of input[shape=", params_shape.DebugString(), in ValidateUpdateShape()
[all …]
Dcudnn_rnn_ops.cc2002 const TensorShape& params_shape, in AllocateOutputs() argument
2022 context->allocate_output(3, params_shape, params_backprop)); in AllocateOutputs()
/external/tensorflow/tensorflow/python/kernel_tests/array_ops/
Dgather_op_test.py473 params_shape=[2, 3, 4, 5, 6, 7],
481 params_shape=[2, 3, 4, 5, 6, 7],
489 params_shape=[2, 3, 4, 5, 6, 7],
497 params_shape=[2, 3, 4, 5, 6, 7],
505 params_shape=[2, 3, 4, 5, 6, 7],
513 params_shape=[2, 3, 4, 5, 6, 7],
521 params_shape=[2, 3, 4, 5, 6, 7],
529 params_shape=[2, 3, 4, 5, 6, 7],
538 def testBatchDimsMatchesPythonBatching(self, params_shape, indices_shape, argument
542 params_size = np.prod(params_shape)
[all …]
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dgather_op.cc275 TensorShape params_shape = context->InputShape(0); in Compile() local
277 OP_REQUIRES(context, TensorShapeUtils::IsVectorOrHigher(params_shape), in Compile()
284 context, num_index_dims <= params_shape.dims(), in Compile()
288 params_shape.dims())); in Compile()
294 OP_REQUIRES_OK(context, XlaGather(params, params_shape, indices, in Compile()
/external/tensorflow/tensorflow/core/ops/
Dcudnn_rnn_ops.cc228 auto params_shape = c->input(3); in __anon815c5c9f0602() local
232 c->set_output(3, params_shape); in __anon815c5c9f0602()
265 auto params_shape = c->input(3); in __anon815c5c9f0702() local
269 c->set_output(3, params_shape); in __anon815c5c9f0702()
305 auto params_shape = c->input(3); in __anon815c5c9f0802() local
309 c->set_output(3, params_shape); in __anon815c5c9f0802()
Darray_ops.cc1186 ShapeHandle params_shape; in __anon42d741191802() local
1187 TF_RETURN_IF_ERROR(c->WithRankAtLeast(c->input(0), 1, &params_shape)); in __anon42d741191802()
1197 if (c->RankKnown(params_shape) && c->RankKnown(indices_shape)) { in __anon42d741191802()
1198 c->set_output(0, c->UnknownShapeOfRank(c->Rank(params_shape) + in __anon42d741191802()
1217 params_shape, axis < 0 ? -axis : axis + 1, &unused)); in __anon42d741191802()
1230 c->WithRankAtLeast(params_shape, batch_dims + 1, &unused)); in __anon42d741191802()
1234 c->Subshape(params_shape, 0, axis, &params_outer_subshape)); in __anon42d741191802()
1251 c->Subshape(params_shape, axis + 1, &params_inner_subshape)); in __anon42d741191802()
/external/tensorflow/tensorflow/python/ops/
Darray_grad.py573 params_shape = array_ops.shape(params)
578 values_shape = array_ops.concat([size, params_shape[1:]], 0)
582 return [ops.IndexedSlices(values, indices, params_shape), None]
585 def _GetBatchIndices(params_shape, indices, batch_dims): argument
590 casted_params_shape = math_ops.cast(params_shape, indices_dtype)
606 def _BatchGatherGrad(params_shape, values, indices, batch_dims, argument
621 indices = _GetBatchIndices(params_shape, indices, batch_dims)
647 params_shape = array_ops.shape(params, out_type=ops.dtypes.int64)
648 params_shape = math_ops.cast(params_shape, dtypes.int32)
663 params_tail_shape = array_ops.identity(params_shape)[1:]
[all …]
Dembedding_ops.py234 params_shape = array_ops.shape(params[0])
235 element_shape_d = params_shape[1:]
Darray_ops.py5159 params_shape = shape(params)
5164 casted_params_shape = gen_math_ops.cast(params_shape, indices_dtype)
5177 outer_shape = params_shape[batch_dims + 1:]
5178 flat_inner_shape = gen_math_ops.prod(params_shape[:batch_dims + 1], [0],
5394 params_shape = shape(params)
5396 batch_shape = params_shape[:batch_dims]
Dresource_variable_ops.py2160 params_shape = variable_shape(handle)
2162 values_shape = array_ops.concat([size, params_shape[1:]], 0)
2165 return (ops.IndexedSlices(values, indices, params_shape), None)
/external/tensorflow/tensorflow/python/kernel_tests/
Darray_ops_test.py1930 for params_shape, indices_shape, batch_dims in shapes:
1932 params_shape=params_shape,
1935 params = constant_op.constant(1.0, shape=(params_shape))
1940 ndims_params = len(params_shape) - batch_dims
1944 expected_out_shape += params_shape[-ndims_rows:]
1988 for params_shape, indices_shape, batch_dims in shapes:
1990 params_shape=params_shape,
1994 np.random.uniform(0.0, 1.0, size=(params_shape)))
2001 params, shape=[-1] + list(params_shape[batch_dims:]))
2010 out_shape = list(params_shape[:batch_dims]) + out_shape[1:]
[all …]
Dresource_variable_ops_test.py1492 params_shape=[2, 3, 4, 5, 6, 7],
1499 params_shape=[2, 3, 4, 5, 6, 7],
1506 params_shape=[2, 3, 4, 5, 6, 7],
1513 params_shape=[2, 3, 4, 5, 6, 7],
1520 params_shape=[2, 3, 4, 5, 6, 7],
1528 def testGatherWithBatchDimsMatchesTensor(self, params_shape, indices_shape, argument
1532 params_size = np.prod(params_shape)
1533 params = np.reshape(np.arange(params_size, dtype=np.int32), params_shape)
1539 indices = indices % params_shape[batch_dims]
Dembedding_ops_test.py553 for params_shape in (12,), (6, 3):
554 params = np.random.randn(*params_shape)
574 for params_shape in (12,), (6, 3), (6, 2, 3):
577 params = 2 * np.ones(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.h1068 inline GatherNdHelperResult GatherNdHelper(const RuntimeShape& params_shape, in GatherNdHelper() argument
1075 const int params_dims = params_shape.DimensionsCount(); in GatherNdHelper()
1080 ret.slice_size *= params_shape.Dims(i); in GatherNdHelper()
1083 int remain_flat_size = params_shape.FlatSize(); in GatherNdHelper()
1086 ret.dims_to_count[i] = remain_flat_size / params_shape.Dims(i); in GatherNdHelper()
1094 inline void GatherNd(const RuntimeShape& params_shape, in GatherNd() argument
1101 const GatherNdHelperResult res = GatherNdHelper(params_shape, indices_shape); in GatherNd()
1114 inline void GatherNdString(const RuntimeShape& params_shape, in GatherNdString() argument
1122 const GatherNdHelperResult res = GatherNdHelper(params_shape, indices_shape); in GatherNdString()
/external/tensorflow/tensorflow/compiler/tf2tensorrt/convert/
Dconvert_nodes_test.cc5264 std::vector<int> params_shape; in TEST_P() member
5448 AddTestTensor("params", p.params_shape, params_input); in TEST_P()
5450 AddTestWeights("params", p.params_shape, params_input, tf_type_); in TEST_P()