Home
last modified time | relevance | path

Searched refs:concat_dim (Results 1 – 25 of 44) sorted by relevance

12

/external/tensorflow/tensorflow/python/kernel_tests/
Dsparse_concat_op_test.py144 for concat_dim in (-2000, 1, 2000):
145 sp_concat = sparse_ops.sparse_concat(concat_dim, [sp_a])
166 for concat_dim in (-1, 1):
167 sp_concat = sparse_ops.sparse_concat(concat_dim, [sp_a, sp_b])
192 for concat_dim in (-2, 0):
193 sp_concat = sparse_ops.sparse_concat(concat_dim, [sp_a, sp_d])
217 for concat_dim in (-1, 1):
218 sp_concat = sparse_ops.sparse_concat(concat_dim, [sp_a, sp_b, sp_c])
241 for concat_dim in (-1, 1):
242 sp_concat = sparse_ops.sparse_concat(concat_dim, [sp_a, sp_b])
[all …]
Dconcat_op_test.py101 concat_dim = np.random.randint(5)
111 input_shape[concat_dim] = np.random.randint(1, 5)
122 c = array_ops.concat(concat_inputs, concat_dim)
135 ind[concat_dim] = slice(cur_offset,
136 cur_offset + params[p[i]].shape[concat_dim])
137 cur_offset += params[p[i]].shape[concat_dim]
270 concat_dim = np.random.randint(5)
277 shape[concat_dim] = x
283 c = array_ops.concat(inp_tensors, concat_dim)
285 output_shape[concat_dim] = concat_dim_sizes.sum()
[all …]
/external/tensorflow/tensorflow/core/kernels/
Dquantized_concat_op.cc109 const int32 concat_dim) { in CalculateInputsDim() argument
111 for (int d = 0; d < concat_dim; ++d) { in CalculateInputsDim()
119 OpKernelContext* context, const int32 concat_dim, in CalculateConcatDims() argument
141 if (j == concat_dim) { in CalculateConcatDims()
156 *output_concat_dim += in.dims() > 0 ? in.dim_size(concat_dim) : 1; in CalculateConcatDims()
168 const int32 concat_dim = concat_dim_tensor->scalar<int32>()(); in Compute() local
188 (0 <= concat_dim && concat_dim < input_dims) || in Compute()
189 (allow_legacy_scalars() && concat_dim == 0), in Compute()
192 ", ", input_dims, "), but got ", concat_dim)); in Compute()
200 const int64 inputs_flat_dim0 = CalculateInputsDim(input_shape, concat_dim); in Compute()
[all …]
Dmkl_concat_op.cc75 const int32 concat_dim = in Compute() local
82 int32 axis = concat_dim < 0 ? concat_dim + input_dims : concat_dim; in Compute()
85 (allow_legacy_scalars() && concat_dim == 0), in Compute()
89 -input_dims, ", ", input_dims, "), but got ", concat_dim)); in Compute()
175 int32 concat_dim = in Compute() local
188 if (concat_dim < 0) concat_dim = expected_dims + concat_dim; in Compute()
203 if (d == concat_dim) continue; in Compute()
297 FindMklCommonFormat(mkl_input_shapes, concat_dim, in Compute()
334 dst_concat_dim_size += src_dims[concat_dim]; in Compute()
346 dst_dims[concat_dim] = dst_concat_dim_size; in Compute()
[all …]
Dconcat_op.cc65 int64 concat_dim; in Compute() local
82 concat_dim = in Compute()
85 concat_dim = in Compute()
95 int32 axis = concat_dim < 0 ? concat_dim + input_dims : concat_dim; in Compute()
98 (allow_legacy_scalars() && concat_dim == 0), in Compute()
102 -input_dims, ", ", input_dims, "), but got ", concat_dim)); in Compute()
281 const Tensor& concat_dim = ctx->input(0); in Compute() local
283 ctx, IsLegacyScalar(concat_dim.shape()), in Compute()
286 concat_dim.shape().DebugString())); in Compute()
315 const int64 cdim = internal::SubtleMustCopy(concat_dim.scalar<int32>()()); in Compute()
Dsparse_concat_op.cc78 const int concat_dim = (concat_dim_attr_ < 0) in Compute() local
81 OP_REQUIRES(context, concat_dim >= 0 && concat_dim < input_rank, in Compute()
93 if (j != concat_dim) { in Compute()
117 concat_order.push_back(concat_dim); in Compute()
119 if (j != concat_dim) { in Compute()
Dconcat_op_test.cc47 Tensor concat_dim(DT_INT32, TensorShape({})); in ConcatHelper() local
48 concat_dim.scalar<int32>()() = concat_dimension; in ConcatHelper()
57 .Input(test::graph::Constant(g, concat_dim)) in ConcatHelper()
103 Tensor concat_dim(DT_INT32, TensorShape({})); in ConcatManyHelper() local
104 concat_dim.scalar<int32>()() = concat_dimension; in ConcatManyHelper()
115 .Input(test::graph::Constant(g, concat_dim)) in ConcatManyHelper()
Dquantized_concat_op_test.cc260 Tensor concat_dim = test::AsScalar<int32>(concat_dimension); in ConcatHelper() local
273 .Input(Constant(g, concat_dim)) in ConcatHelper()
/external/tensorflow/tensorflow/compiler/tests/
Dconcat_ops_test.py85 concat_dim = np.random.randint(5)
95 input_shape[concat_dim] = np.random.randint(1, 5)
107 c = array_ops.concat(concat_inputs, concat_dim)
120 ind[concat_dim] = slice(cur_offset,
121 cur_offset + params[p[i]].shape[concat_dim])
122 cur_offset += params[p[i]].shape[concat_dim]
221 concat_dim = np.random.randint(5)
229 shape[concat_dim] = x
237 c = array_ops.concat(inp_tensors, concat_dim)
239 output_shape[concat_dim] = concat_dim_sizes.sum()
[all …]
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dconcat_op.cc52 int64 concat_dim; in Compile() local
54 ctx->ConstantInputAsIntScalar(axis_index_, &concat_dim)); in Compile()
63 int32 axis = concat_dim < 0 ? concat_dim + input_dims : concat_dim; in Compile()
68 -input_dims, ", ", input_dims, "), but got ", concat_dim)); in Compile()
92 VLOG(1) << "Concat dim " << concat_dim << " equivalent to " << axis; in Compile()
/external/tensorflow/tensorflow/core/api_def/base_api/
Dapi_def_Concat.pbtxt5 name: "concat_dim"
15 and their sizes must match in all dimensions except `concat_dim`.
22 `concat_dim` dimension. This tensor's shape matches that of `values` except
23 in `concat_dim` where it has the sum of the sizes.
Dapi_def_QuantizedConcat.pbtxt4 name: "concat_dim"
14 and their sizes must match in all dimensions except `concat_dim`.
33 `concat_dim` dimension. This tensor's shape matches that of `values` except
34 in `concat_dim` where it has the sum of the sizes.
Dapi_def_ConcatV2.pbtxt10 and their sizes must match in all dimensions except `concat_dim`.
24 `concat_dim` dimension. This tensor's shape matches that of `values` except
25 in `concat_dim` where it has the sum of the sizes.
Dapi_def_SparseConcat.pbtxt40 name: "concat_dim"
65 For example, if `concat_dim = 1` and the inputs are
Dapi_def_ConcatOffset.pbtxt5 name: "concat_dim"
/external/tensorflow/tensorflow/python/ops/
Darray_grad.py66 def _CreateDenseMaskAndBegin(sizes, concat_dim): argument
74 array_ops.fill(array_ops.expand_dims(concat_dim, 0), 0), [1],
75 array_ops.fill(shape_of_shape - concat_dim - 1, 0)
103 concat_dim = op.inputs[dim_index]
112 concat_dim._numpy().item(0) % input_values[0]._rank()) # pylint: disable=protected-access
118 if constant_op.is_constant(concat_dim):
126 dim_context = control_flow_util.GetOutputContext(concat_dim.op)
128 value = tensor_util.constant_value(concat_dim)
129 concat_dim = constant_op.constant(value=value, dtype=concat_dim.dtype)
133 non_neg_concat_dim = concat_dim % array_ops.rank(input_values[0])
[all …]
/external/tensorflow/tensorflow/core/grappler/optimizers/
Dlayout_optimizer_test.cc670 auto concat_dim = node_map.GetNode("concat-3-LayoutOptimizer"); in TEST_F() local
671 EXPECT_EQ(concat_dim->attr().at({"value"}).tensor().int_val(0), 1); in TEST_F()
691 auto concat_dim = node_map.GetNode("concat-2-LayoutOptimizer"); in TEST_F() local
692 EXPECT_EQ(concat_dim->attr().at({"value"}).tensor().int_val(0), 2); in TEST_F()
713 auto concat_dim = in TEST_F() local
715 EXPECT_EQ(concat_dim->op(), "DataFormatDimMap"); in TEST_F()
716 EXPECT_EQ(concat_dim->input(0), "i"); in TEST_F()
736 auto concat_dim = node_map.GetNode("concat-2-LayoutOptimizer"); in TEST_F() local
737 EXPECT_EQ(concat_dim->attr().at({"value"}).tensor().int_val(0), 3); in TEST_F()
757 auto concat_dim = node_map.GetNode("concat-2-LayoutOptimizer"); in TEST_F() local
[all …]
/external/tensorflow/tensorflow/core/framework/
Dcommon_shape_fns.cc1250 const int32 concat_dim = concat_dim_t->scalar<int32>()(); in ConcatShapeHelper() local
1253 const int min_rank = concat_dim < 0 ? -concat_dim : concat_dim + 1; in ConcatShapeHelper()
1260 TF_RETURN_IF_ERROR(c->Subshape(input, 0, concat_dim, &output_before)); in ConcatShapeHelper()
1261 DimensionHandle output_middle = c->Dim(input, concat_dim); in ConcatShapeHelper()
1262 if (concat_dim == -1) { in ConcatShapeHelper()
1265 TF_RETURN_IF_ERROR(c->Subshape(input, concat_dim + 1, &output_after)); in ConcatShapeHelper()
1273 TF_RETURN_IF_ERROR(c->Subshape(input, 0, concat_dim, &before)); in ConcatShapeHelper()
1274 DimensionHandle middle = c->Dim(input, concat_dim); in ConcatShapeHelper()
1275 if (concat_dim == -1) { in ConcatShapeHelper()
1278 TF_RETURN_IF_ERROR(c->Subshape(input, concat_dim + 1, &after)); in ConcatShapeHelper()
Dop_def_builder_test.cc504 name: "concat_dim" in TEST_F()
510 …Their ranks and types must match,\nand their sizes must match in all dimensions except concat_dim." in TEST_F()
/external/tensorflow/tensorflow/core/graph/
Dtestlib.h191 Node* Concat(Graph* g, Node* concat_dim, gtl::ArraySlice<Node*> tensors);
196 Node* ConcatV2(Graph* g, gtl::ArraySlice<Node*> tensors, Node* concat_dim);
Dtestlib.cc357 Node* Concat(Graph* g, Node* concat_dim, gtl::ArraySlice<Node*> tensors) { in Concat() argument
365 .Input(concat_dim) in Concat()
371 Node* ConcatV2(Graph* g, gtl::ArraySlice<Node*> tensors, Node* concat_dim) { in ConcatV2() argument
380 .Input(concat_dim) in ConcatV2()
/external/tensorflow/tensorflow/core/common_runtime/
Dshape_refiner_test.cc1087 auto concat_dim = ops::Const(root, 0); in TEST_F() local
1088 auto concat = ops::Concat(root, concat_inputs, concat_dim); in TEST_F()
1102 TF_ASSERT_OK(m.AddNode(concat_dim.node())); in TEST_F()
1129 auto concat_dim = ops::Const(root, 0); in TEST_F() local
1130 auto concat = ops::Concat(root, concat_inputs, concat_dim); in TEST_F()
1145 TF_ASSERT_OK(m.AddNode(concat_dim.node())); in TEST_F()
1171 auto concat_dim = ops::Const(root, 0); in TEST_F() local
1172 auto concat = ops::Concat(root, concat_inputs, concat_dim); in TEST_F()
1186 TF_ASSERT_OK(m.AddNode(concat_dim.node())); in TEST_F()
/external/tensorflow/tensorflow/tools/api/golden/v1/
Dtensorflow.quantization.pbtxt41 …argspec: "args=[\'concat_dim\', \'values\', \'input_mins\', \'input_maxes\', \'name\'], varargs=No…
/external/tensorflow/tensorflow/tools/api/golden/v2/
Dtensorflow.quantization.pbtxt41 …argspec: "args=[\'concat_dim\', \'values\', \'input_mins\', \'input_maxes\', \'name\'], varargs=No…
/external/tensorflow/tensorflow/compiler/xla/service/
Dhlo_evaluator.cc457 const int64 concat_dim = concatenate->dimensions()[0]; in HandleConcatenate() local
458 CHECK_GE(concat_dim, 0); in HandleConcatenate()
459 CHECK_LT(concat_dim, rank); in HandleConcatenate()
469 concat_dimensions[concat_dim] += in HandleConcatenate()
470 ShapeUtil::GetDimension(operand_shape, concat_dim); in HandleConcatenate()
483 dest_indices[concat_dim] += in HandleConcatenate()
484 ShapeUtil::GetDimension(operand_shape, concat_dim); in HandleConcatenate()

12