Home
last modified time | relevance | path

Searched refs:batch_dim (Results 1 – 25 of 66) sorted by relevance

123

/external/tensorflow/tensorflow/core/kernels/
Dreverse_sequence_op.cc44 void CheckErrors(OpKernelContext* context, int batch_dim, int seq_dim) { in CheckErrors() argument
56 OP_REQUIRES(context, batch_dim != seq_dim, in CheckErrors()
61 OP_REQUIRES(context, batch_dim < input.dims(), in CheckErrors()
63 batch_dim, " vs. ", input.dims(), ")")); in CheckErrors()
65 context, seq_lengths.NumElements() == input.dim_size(batch_dim), in CheckErrors()
66 errors::InvalidArgument("Length of seq_lengths != input.dims(", batch_dim, in CheckErrors()
68 input.dim_size(batch_dim), ")")); in CheckErrors()
79 void CheckErrorsGPU(OpKernelContext* context, int batch_dim, int seq_dim) { in CheckErrorsGPU() argument
83 OP_REQUIRES(context, batch_dim != seq_dim, in CheckErrorsGPU()
88 OP_REQUIRES(context, batch_dim < input.dims(), in CheckErrorsGPU()
[all …]
Dreverse_sequence_op.h32 ReverseGenerator(typename TTypes<T, Dims>::ConstTensor input, int32 batch_dim, in ReverseGenerator() argument
35 batch_dim_(batch_dim), in ReverseGenerator()
65 int32 batch_dim, int32 seq_dim, in Compute()
68 generator::ReverseGenerator<T, Tlen, Dims> generator(input, batch_dim, in Compute()
Dconv_grad_shape_utils.cc114 int batch_dim = GetTensorBatchDimIndex(num_dims, data_format); in ConvBackpropComputeDimensionsV2() local
115 dims->batch_size = input_shape.dim_size(batch_dim); in ConvBackpropComputeDimensionsV2()
116 if (dims->batch_size != out_backprop_shape.dim_size(batch_dim)) { in ConvBackpropComputeDimensionsV2()
120 ", outbackprop batch: ", out_backprop_shape.dim_size(batch_dim), in ConvBackpropComputeDimensionsV2()
121 ", batch_dim: ", batch_dim); in ConvBackpropComputeDimensionsV2()
Dscatter_nd_op.cc781 const int64 batch_dim = (indices.dims() > 1) ? indices.dims() - 1 : 1; in ValidateUpdateShape() local
785 "Dimensions [0,", batch_dim, in ValidateUpdateShape()
787 "] must match dimensions [0,", batch_dim, in ValidateUpdateShape()
798 if (updates.dims() < batch_dim) return shape_err_prefix(); in ValidateUpdateShape()
799 if (params_shape.dims() < slice_dim + (updates.dims() - batch_dim)) { in ValidateUpdateShape()
802 if (updates.dims() != batch_dim + params_shape.dims() - slice_dim) { in ValidateUpdateShape()
805 for (int d = 0; d < batch_dim; ++d) { in ValidateUpdateShape()
808 for (int d = 0; d < updates.dims() - batch_dim; ++d) { in ValidateUpdateShape()
809 if (updates.dim_size(d + batch_dim) != in ValidateUpdateShape()
/external/tensorflow/tensorflow/lite/delegates/hexagon/
Dutils_test.cc27 unsigned int batch_dim, height_dim, width_dim, depth_dim; in TEST() local
34 Get4DShape(&batch_dim, &height_dim, &width_dim, &depth_dim, shape_4d), in TEST()
36 EXPECT_EQ(batch_dim, shape_4d->data[0]); in TEST()
45 unsigned int batch_dim, height_dim, width_dim, depth_dim; in TEST() local
50 Get4DShape(&batch_dim, &height_dim, &width_dim, &depth_dim, shape_2d), in TEST()
52 EXPECT_EQ(batch_dim, 1); in TEST()
61 unsigned int batch_dim, height_dim, width_dim, depth_dim; in TEST() local
64 Get4DShape(&batch_dim, &height_dim, &width_dim, &depth_dim, shape_5d), in TEST()
/external/tensorflow/tensorflow/core/api_def/base_api/
Dapi_def_ReverseSequence.pbtxt12 1-D with length `input.dims(batch_dim)` and
29 name: "batch_dim"
36 This op first slices `input` along the dimension `batch_dim`, and for each
41 and `seq_lengths` must be a vector of length `input.dims[batch_dim]`.
43 The output slice `i` along dimension `batch_dim` is then given by input
51 batch_dim = 0
73 batch_dim = 2
/external/tensorflow/tensorflow/lite/kernels/
Dreverse_sequence.cc83 int batch_dim = params->batch_dim; in ReverseSequenceImpl() local
86 TF_LITE_ENSURE(context, batch_dim >= 0); in ReverseSequenceImpl()
87 TF_LITE_ENSURE(context, seq_dim != batch_dim); in ReverseSequenceImpl()
89 TF_LITE_ENSURE(context, batch_dim < NumDimensions(input)); in ReverseSequenceImpl()
91 SizeOfDimension(input, batch_dim)); in ReverseSequenceImpl()
101 seq_lengths, seq_dim, batch_dim, GetTensorShape(input), in ReverseSequenceImpl()
Dreverse_sequence_test.cc33 int seq_dim, int batch_dim) { in ReverseSequenceOpModel() argument
41 CreateReverseSequenceOptions(builder_, seq_dim, batch_dim).Union()); in ReverseSequenceOpModel()
/external/tensorflow/tensorflow/compiler/xla/service/
Dspace_to_batch_converter_test.cc59 const int64 batch_dim = reshape->operand(0) in TEST_F() local
64 EXPECT_GT(reshape->operand(0)->shape().dimensions(batch_dim), 1); in TEST_F()
108 const int64 batch_dim = reshape->operand(0) in TEST_F() local
113 EXPECT_GT(reshape->operand(0)->shape().dimensions(batch_dim), 4); in TEST_F()
142 const int64 batch_dim = reshape->operand(0) in TEST_F() local
147 EXPECT_GT(reshape->operand(0)->shape().dimensions(batch_dim), 4); in TEST_F()
Dbatch_dot_simplification.cc57 for (int64 batch_dim : dim_numbers.lhs_batch_dimensions()) { in ElideDegenerateBatchDimensionFromBatchDot() local
58 if (lhs_shape.dimensions(batch_dim) == 1) { in ElideDegenerateBatchDimensionFromBatchDot()
59 degenerate_dims.push_back(batch_dim); in ElideDegenerateBatchDimensionFromBatchDot()
Dtopk_rewriter.cc92 const int64 batch_dim = sort_dim == 1 ? 0 : 1; in Run() local
117 if (has_batch && slice->slice_limits(batch_dim) != in Run()
118 slice->operand(0)->shape().dimensions(batch_dim)) { in Run()
141 has_batch ? sort->operand(0)->shape().dimensions(batch_dim) : 1; in Run()
Ddynamic_dimension_inference_test.cc944 WindowDimension* batch_dim = window.add_dimensions(); in TEST_F() local
945 batch_dim->set_size(1); in TEST_F()
946 batch_dim->set_stride(1); in TEST_F()
947 batch_dim->set_padding_low(0); in TEST_F()
948 batch_dim->set_padding_high(0); in TEST_F()
949 batch_dim->set_window_dilation(1); in TEST_F()
950 batch_dim->set_base_dilation(1); in TEST_F()
994 WindowDimension* batch_dim = window.add_dimensions(); in TEST_F() local
995 batch_dim->set_size(1); in TEST_F()
996 batch_dim->set_stride(1); in TEST_F()
[all …]
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dscatter_nd_op.cc44 const int64 batch_dim = indices_shape.dims() - 1; in ValidateUpdateShape() local
53 ", num_index_dims: ", num_index_dims, ", and batch_dim: ", batch_dim); in ValidateUpdateShape()
56 if (updates_shape.dims() < batch_dim) return shape_err(); in ValidateUpdateShape()
58 num_index_dims + (updates_shape.dims() - batch_dim)) { in ValidateUpdateShape()
62 batch_dim + buffer_shape.dims() - num_index_dims) { in ValidateUpdateShape()
65 for (int d = 0; d < batch_dim; ++d) { in ValidateUpdateShape()
70 for (int d = 0; d < updates_shape.dims() - batch_dim; ++d) { in ValidateUpdateShape()
71 if (updates_shape.dim_size(d + batch_dim) != in ValidateUpdateShape()
Dextract_image_patches_op.cc61 int batch_dim = GetTensorBatchDimIndex(num_dims, data_format); in Compile() local
64 ctx, ksizes_[batch_dim] == 1 && ksizes_[feature_dim] == 1, in Compile()
69 ctx, strides_[batch_dim] == 1 && strides_[feature_dim] == 1, in Compile()
73 ctx, dilations_[batch_dim] == 1 && dilations_[feature_dim] == 1, in Compile()
132 dims.set_input_batch_dimension(batch_dim); in Compile()
133 dims.set_output_batch_dimension(batch_dim); in Compile()
Dconv_op_helpers.cc106 int batch_dim = GetTensorBatchDimIndex(num_dims, attrs.data_format); in CheckConvAttrs() local
108 if (attrs.strides[batch_dim] != 1 || attrs.strides[feature_dim] != 1) { in CheckConvAttrs()
118 if (attrs.dilations[batch_dim] != 1 || attrs.dilations[feature_dim] != 1) { in CheckConvAttrs()
210 int batch_dim = GetTensorBatchDimIndex(num_dims, attrs.data_format); in MakeXlaForwardConvOp() local
240 dims.set_input_batch_dimension(batch_dim); in MakeXlaForwardConvOp()
241 dims.set_output_batch_dimension(batch_dim); in MakeXlaForwardConvOp()
300 int batch_dim = GetTensorBatchDimIndex(num_dims, attrs.data_format); in MakeXlaBackpropInputConvOp() local
328 dnums.set_input_batch_dimension(batch_dim); in MakeXlaBackpropInputConvOp()
329 dnums.set_output_batch_dimension(batch_dim); in MakeXlaBackpropInputConvOp()
/external/tensorflow/tensorflow/core/ops/
Dimage_ops.cc30 Status SetOutputToSizedImage(InferenceContext* c, DimensionHandle batch_dim, in SetOutputToSizedImage() argument
58 c->set_output(0, c->MakeShape({batch_dim, height, width, channel_dim})); in SetOutputToSizedImage()
228 DimensionHandle batch_dim = c->Dim(boxes, 0); in CombinedNMSShapeFn() local
251 c->set_output(0, c->MakeShape({batch_dim, output_size, 4})); in CombinedNMSShapeFn()
252 c->set_output(1, c->MakeShape({batch_dim, output_size})); in CombinedNMSShapeFn()
253 c->set_output(2, c->MakeShape({batch_dim, output_size})); in CombinedNMSShapeFn()
254 c->set_output(3, c->Vector(batch_dim)); in CombinedNMSShapeFn()
822 DimensionHandle batch_dim; in __anon30b5031d1402() local
824 c->Merge(c->Dim(input, 0), c->Dim(offsets, 0), &batch_dim)); in __anon30b5031d1402()
838 return SetOutputToSizedImage(c, batch_dim, 1 /* size_input_idx */, in __anon30b5031d1402()
[all …]
/external/tensorflow/tensorflow/compiler/xla/client/lib/
Dsvd_test.cc64 Array3D<float> GetUnitMatrix3D(int32 batch_dim, int32 mat_dim) { in GetUnitMatrix3D() argument
65 Array3D<float> result(batch_dim, mat_dim, mat_dim, 0.0); in GetUnitMatrix3D()
66 for (int i = 0; i < batch_dim; ++i) { in GetUnitMatrix3D()
Dslicing.cc285 for (int64 batch_dim = 0; batch_dim < batch_dims; ++batch_dim) { in TorchIndexSelect() local
286 to_concat.push_back(Iota(builder, index_shape, batch_dim)); in TorchIndexSelect()
/external/tensorflow/tensorflow/python/keras/engine/
Dcompile_utils.py196 batch_dim = None
212 if batch_dim is None:
214 batch_dim = y_t.nrows()
216 batch_dim = array_ops.shape(y_t)[0]
219 metric_obj.update_state(loss_metric_value, sample_weight=batch_dim)
244 total_loss_metric_value, sample_weight=batch_dim)
/external/tensorflow/tensorflow/python/ops/
Ddata_flow_ops.py385 batch_dim = tensor_shape.dimension_value(
387 batch_dim = tensor_shape.Dimension(batch_dim)
392 batch_dim = batch_dim.merge_with(val_batch_dim)
494 batch_dim = tensor_shape.Dimension(
498 tensor_shape.TensorShape([batch_dim]).concatenate(shape))
1168 batch_dim = None
1170 batch_dim = tensor_shape.Dimension(
1172 op.outputs[0].set_shape(tensor_shape.TensorShape([batch_dim])) # indices
1173 op.outputs[1].set_shape(tensor_shape.TensorShape([batch_dim])) # keys
1176 tensor_shape.TensorShape([batch_dim]).concatenate(shape))
/external/tensorflow/tensorflow/python/data/experimental/ops/
Ddistribute.py515 batch_dim = batch_dims[0]
518 batch_dim = -1
521 batch_dim, dtype=dtypes.int64, name="static_batch_size")
/external/tensorflow/tensorflow/compiler/xla/service/gpu/
Dgemm_thunk.cc197 for (int64 batch_dim : dim_nums.lhs_batch_dimensions()) { in RunGemm() local
198 CHECK_NE(row_dim, batch_dim); in RunGemm()
199 CHECK_NE(col_dim, batch_dim); in RunGemm()
Dgpu_layout_assignment.cc223 for (int64 batch_dim : dim_nums.lhs_batch_dimensions()) { in AddBackendConstraints() local
224 CHECK_LT(batch_dim, instruction->shape().rank() - 2); in AddBackendConstraints()
/external/tensorflow/tensorflow/core/ops/compat/ops_history_v1/
DReverseSequence.pbtxt20 name: "batch_dim"
/external/tensorflow/tensorflow/core/ops/compat/ops_history_v2/
DReverseSequence.pbtxt20 name: "batch_dim"

123