Home
last modified time | relevance | path

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

12

/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()
64 OP_REQUIRES(context, seq_lens.NumElements() == input.dim_size(batch_dim), in CheckErrors()
65 errors::InvalidArgument("len(seq_lens) != input.dims(", batch_dim, in CheckErrors()
67 " vs. ", input.dim_size(batch_dim), ")")); in CheckErrors()
78 void CheckErrorsGPU(OpKernelContext* context, int batch_dim, int seq_dim) { in CheckErrorsGPU() argument
82 OP_REQUIRES(context, batch_dim != seq_dim, in CheckErrorsGPU()
87 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_ops.cc118 int batch_dim = GetTensorBatchDimIndex(num_dims, data_format); in ConvBackpropComputeDimensionsV2() local
119 dims->batch_size = input_shape.dim_size(batch_dim); in ConvBackpropComputeDimensionsV2()
120 if (dims->batch_size != out_backprop_shape.dim_size(batch_dim)) { in ConvBackpropComputeDimensionsV2()
124 "outbackprop batch: ", out_backprop_shape.dim_size(batch_dim), in ConvBackpropComputeDimensionsV2()
125 " batch_dim: ", batch_dim); in ConvBackpropComputeDimensionsV2()
Dscatter_nd_op.cc522 const int64 batch_dim = (indices.dims() > 1) ? indices.dims() - 1 : 1; in ValidateUpdateShape() local
531 ", slice_dim: ", slice_dim, ", and batch_dim: ", batch_dim); in ValidateUpdateShape()
534 if (updates.dims() < batch_dim) return shape_err(); in ValidateUpdateShape()
535 if (params_shape.dims() < slice_dim + (updates.dims() - batch_dim)) { in ValidateUpdateShape()
538 if (updates.dims() != batch_dim + params_shape.dims() - slice_dim) { in ValidateUpdateShape()
541 for (int d = 0; d < batch_dim; ++d) { in ValidateUpdateShape()
544 for (int d = 0; d < updates.dims() - batch_dim; ++d) { in ValidateUpdateShape()
545 if (updates.dim_size(d + batch_dim) != in ValidateUpdateShape()
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dscatter_nd_op.cc42 const int64 batch_dim = indices_shape.dims() - 1; in ValidateUpdateShape() local
51 ", num_index_dims: ", num_index_dims, ", and batch_dim: ", batch_dim); in ValidateUpdateShape()
54 if (updates_shape.dims() < batch_dim) return shape_err(); in ValidateUpdateShape()
56 num_index_dims + (updates_shape.dims() - batch_dim)) { in ValidateUpdateShape()
60 batch_dim + buffer_shape.dims() - num_index_dims) { in ValidateUpdateShape()
63 for (int d = 0; d < batch_dim; ++d) { in ValidateUpdateShape()
68 for (int d = 0; d < updates_shape.dims() - batch_dim; ++d) { in ValidateUpdateShape()
69 if (updates_shape.dim_size(d + batch_dim) != in ValidateUpdateShape()
Dextract_image_patches_op.cc54 int batch_dim = GetTensorBatchDimIndex(num_dims, data_format); in Compile() local
57 ctx, ksizes_[batch_dim] == 1 && ksizes_[feature_dim] == 1, in Compile()
62 ctx, strides_[batch_dim] == 1 && strides_[feature_dim] == 1, in Compile()
66 ctx, dilations_[batch_dim] == 1 && dilations_[feature_dim] == 1, in Compile()
126 dims.set_input_batch_dimension(batch_dim); in Compile()
127 dims.set_output_batch_dimension(batch_dim); in Compile()
Dconv_op_helpers.cc173 int batch_dim = GetTensorBatchDimIndex(num_dims, attrs.data_format); in CheckConvAttrs() local
175 if (attrs.strides[batch_dim] != 1 || attrs.strides[feature_dim] != 1) { in CheckConvAttrs()
184 if (attrs.dilations[batch_dim] != 1 || attrs.dilations[feature_dim] != 1) { in CheckConvAttrs()
269 int batch_dim = GetTensorBatchDimIndex(num_dims, attrs.data_format); in MakeXlaForwardConvOp() local
291 dims.set_input_batch_dimension(batch_dim); in MakeXlaForwardConvOp()
292 dims.set_output_batch_dimension(batch_dim); in MakeXlaForwardConvOp()
329 int batch_dim = GetTensorBatchDimIndex(num_dims, attrs.data_format); in MakeXlaBackpropInputConvOp() local
352 dnums.set_input_batch_dimension(batch_dim); in MakeXlaBackpropInputConvOp()
353 dnums.set_output_batch_dimension(batch_dim); in MakeXlaBackpropInputConvOp()
/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.cc73 int batch_dim = params->batch_dim; in ReverseSequenceImpl() local
76 TF_LITE_ENSURE(context, batch_dim >= 0); in ReverseSequenceImpl()
77 TF_LITE_ENSURE(context, seq_dim != batch_dim); in ReverseSequenceImpl()
79 TF_LITE_ENSURE(context, batch_dim < NumDimensions(input)); in ReverseSequenceImpl()
81 SizeOfDimension(input, batch_dim)); in ReverseSequenceImpl()
89 seq_lengths, seq_dim, batch_dim, GetTensorShape(input), in ReverseSequenceImpl()
Dreverse_sequence_test.cc30 int seq_dim, int batch_dim) { in ReverseSequenceOpModel() argument
38 CreateReverseSequenceOptions(builder_, seq_dim, batch_dim).Union()); in ReverseSequenceOpModel()
/external/tensorflow/tensorflow/contrib/recurrent/python/ops/
Dfunctional_rnn.py398 batch_dim = 0
401 batch_dim = 1
403 def _reverse(input_, seq_lengths, seq_dim, batch_dim): argument
407 seq_dim=seq_dim, batch_dim=batch_dim)
420 batch_dim=batch_dim)
437 batch_dim=batch_dim)
/external/tensorflow/tensorflow/compiler/xla/service/
Ddynamic_dimension_inference_test.cc558 WindowDimension* batch_dim = window.add_dimensions(); in TEST_F() local
559 batch_dim->set_size(1); in TEST_F()
560 batch_dim->set_stride(1); in TEST_F()
561 batch_dim->set_padding_low(0); in TEST_F()
562 batch_dim->set_padding_high(0); in TEST_F()
563 batch_dim->set_window_dilation(1); in TEST_F()
564 batch_dim->set_base_dilation(1); in TEST_F()
608 WindowDimension* batch_dim = window.add_dimensions(); in TEST_F() local
609 batch_dim->set_size(1); in TEST_F()
610 batch_dim->set_stride(1); in TEST_F()
[all …]
Dbatch_dot_simplification.cc39 for (int64 batch_dim : dim_numbers.lhs_batch_dimensions()) { in ElideDegenerateBatchDimensionFromBatchDot() local
40 if (lhs_shape.dimensions(batch_dim) == 1) { in ElideDegenerateBatchDimensionFromBatchDot()
41 degenerate_dims.push_back(batch_dim); in ElideDegenerateBatchDimensionFromBatchDot()
/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()
168 DimensionHandle batch_dim = c->Dim(boxes, 0); in CombinedNMSShapeFn() local
191 c->set_output(0, c->MakeShape({batch_dim, output_size, 4})); in CombinedNMSShapeFn()
192 c->set_output(1, c->MakeShape({batch_dim, output_size})); in CombinedNMSShapeFn()
193 c->set_output(2, c->MakeShape({batch_dim, output_size})); in CombinedNMSShapeFn()
194 c->set_output(3, c->Vector(batch_dim)); in CombinedNMSShapeFn()
689 DimensionHandle batch_dim; in __anon6a71d27f1202() local
691 c->Merge(c->Dim(input, 0), c->Dim(offsets, 0), &batch_dim)); in __anon6a71d27f1202()
705 return SetOutputToSizedImage(c, batch_dim, 1 /* size_input_idx */, in __anon6a71d27f1202()
/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))
1090 batch_dim = None
1092 batch_dim = tensor_shape.Dimension(
1094 op.outputs[0].set_shape(tensor_shape.vector(batch_dim)) # indices
1095 op.outputs[1].set_shape(tensor_shape.vector(batch_dim)) # keys
1098 tensor_shape.TensorShape([batch_dim]).concatenate(shape))
/external/tensorflow/tensorflow/contrib/image/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()
/external/tensorflow/tensorflow/compiler/xla/client/lib/
Dsvd_test.cc59 Array3D<float> GetUnitMatrix3D(int32 batch_dim, int32 mat_dim) { in GetUnitMatrix3D() argument
60 Array3D<float> result(batch_dim, mat_dim, mat_dim, 0.0); in GetUnitMatrix3D()
61 for (int i = 0; i < batch_dim; ++i) { in GetUnitMatrix3D()
/external/tensorflow/tensorflow/contrib/gan/python/features/python/
Dvirtual_batchnorm_impl.py98 def _validate_call_input(tensor_list, batch_dim): argument
102 del shape[batch_dim]
/external/tensorflow/tensorflow/compiler/xla/service/gpu/
Dgemm_thunk.cc335 for (int64 batch_dim : dim_nums.lhs_batch_dimensions()) { in ExecuteOnStream() local
336 CHECK_NE(row_dim, batch_dim); in ExecuteOnStream()
337 CHECK_NE(col_dim, batch_dim); in ExecuteOnStream()
Dgpu_layout_assignment.cc200 for (int64 batch_dim : dim_nums.lhs_batch_dimensions()) { in AddBackendConstraints() local
201 CHECK_LT(batch_dim, instruction->shape().rank() - 2); in AddBackendConstraints()
Dir_emitter.cc514 for (int64 batch_dim : dnums.lhs_batch_dimensions()) { in HandleDot() local
515 CHECK_NE(lhs_reduction_dimension, batch_dim); in HandleDot()
516 CHECK_NE(rhs_reduction_dimension, batch_dim); in HandleDot()
/external/tensorflow/tensorflow/cc/gradients/
Darray_grad.cc246 int batch_dim; in ReverseSequenceGrad() local
247 TF_RETURN_IF_ERROR(GetNodeAttr(op.node()->attrs(), "batch_dim", &batch_dim)); in ReverseSequenceGrad()
252 ReverseSequence::BatchDim(batch_dim))); in ReverseSequenceGrad()
/external/tensorflow/tensorflow/lite/c/
Dbuiltin_op_data.h373 int batch_dim; member
/external/tensorflow/tensorflow/python/kernel_tests/
Dsparse_xent_op_test.py52 batch_dim = 0
54 batch_size = features.shape[batch_dim]
/external/tensorflow/tensorflow/lite/core/api/
Dflatbuffer_conversions.cc681 params->batch_dim = reverse_seq_params->batch_dim(); in ParseOpData()

12