/external/tensorflow/tensorflow/core/util/ |
D | tensor_format_test.cc | 115 GetTensorDimMap(const int num_spatial_dims, const TensorFormat format) { in GetTensorDimMap() argument 118 format == FORMAT_NHWC_VECT_W) ? DimMaps::kTdmNHWC[num_spatial_dims] : in GetTensorDimMap() 120 format == FORMAT_NCHW_VECT_C) ? DimMaps::kTdmNCHW[num_spatial_dims] : in GetTensorDimMap() 121 (format == FORMAT_HWNC) ? DimMaps::kTdmHWNC[num_spatial_dims] : in GetTensorDimMap() 122 (format == FORMAT_HWCN) ? DimMaps::kTdmHWCN[num_spatial_dims] in GetTensorDimMap() 127 GetFilterDimMap(const int num_spatial_dims, in GetFilterDimMap() argument 130 (format == FORMAT_HWIO) ? DimMaps::kFdmHWIO[num_spatial_dims] : in GetFilterDimMap() 132 format == FORMAT_OIHW_VECT_I) ? DimMaps::kFdmOIHW[num_spatial_dims] in GetFilterDimMap() 170 template <int num_spatial_dims> 174 auto& tdm = GetTensorDimMap(num_spatial_dims, format); in RunDimensionIndexesTest() [all …]
|
D | tensor_format.h | 136 inline int GetTensorDimsFromSpatialDims(int num_spatial_dims, in GetTensorDimsFromSpatialDims() argument 143 return num_spatial_dims + 2; // Include N,C. in GetTensorDimsFromSpatialDims() 146 return num_spatial_dims + 3; // Include N,C,VectDim. in GetTensorDimsFromSpatialDims() 152 inline int GetFilterTensorDimsFromSpatialDims(int num_spatial_dims, in GetFilterTensorDimsFromSpatialDims() argument 155 return num_spatial_dims + 3; // Include O,I,InnerI. in GetFilterTensorDimsFromSpatialDims() 157 return num_spatial_dims + 2; // Include O,I. in GetFilterTensorDimsFromSpatialDims()
|
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/ |
D | conv_op_helpers.cc | 168 const int num_dims = attrs.num_spatial_dims + 2; in CheckConvAttrs() 189 for (int i = 0; i < attrs.num_spatial_dims; ++i) { in CheckConvAttrs() 203 StringPiece label, int num_spatial_dims, const xla::Shape& input_shape, in ConvBackpropComputeDimensionsV2XlaShapes() argument 215 label, num_spatial_dims, input_tensor_shape, filter_tensor_shape, in ConvBackpropComputeDimensionsV2XlaShapes() 222 xla::StatusOr<ConvOpAttrs> ConvOpAttrs::Create(int num_spatial_dims, in Create() argument 226 attrs.num_spatial_dims = num_spatial_dims; in Create() 257 int num_dims = attrs.num_spatial_dims + 2; in MakeXlaForwardConvOp() 272 int64 in_depth = filter_shape.dimensions(attrs.num_spatial_dims); in MakeXlaForwardConvOp() 286 std::vector<int64> window_strides(attrs.num_spatial_dims); in MakeXlaForwardConvOp() 287 std::vector<int64> lhs_dilation(attrs.num_spatial_dims, 1); in MakeXlaForwardConvOp() [all …]
|
D | depthtospace_op.cc | 70 int num_spatial_dims = GetTensorSpatialDims(input_rank, data_format); in Compile() local 80 for (int i = 0; i < num_spatial_dims; ++i) { in Compile() 84 for (int i = 0; i < num_spatial_dims; ++i) { in Compile() 91 for (int i = 0; i < num_spatial_dims; ++i) { in Compile() 93 transpose_order.push_back(i + 1 + num_spatial_dims); in Compile() 95 transpose_order.push_back(feature_dim + num_spatial_dims); in Compile() 98 for (int i = 0; i < num_spatial_dims; ++i) { in Compile() 106 for (int i = 0; i < num_spatial_dims; ++i) { in Compile() 111 for (int i = 0; i < num_spatial_dims; ++i) { in Compile() 116 transpose_order.push_back(1 + num_spatial_dims); in Compile() [all …]
|
D | extract_image_patches_op.cc | 43 const int num_spatial_dims = num_dims - 2; in Compile() local 70 for (int i = 0; i < num_spatial_dims; ++i) { in Compile() 103 for (int i = 0; i < num_spatial_dims; ++i) { in Compile() 108 lhs_shape[num_spatial_dims] = depth; in Compile() 109 lhs_shape[num_spatial_dims + 1] = 1; in Compile() 118 xla::Eq(lhs, iota, {num_spatial_dims + 1}), type); in Compile() 121 std::vector<int64> window_strides(num_spatial_dims); in Compile() 122 std::vector<int64> lhs_dilation(num_spatial_dims, 1); in Compile() 123 std::vector<int64> rhs_dilation(num_spatial_dims); in Compile() 124 std::vector<std::pair<int64, int64>> padding(num_spatial_dims); in Compile() [all …]
|
D | image_resize_ops.cc | 85 int num_spatial_dims = in_size.size(); in ComputeResizeConvolutionParameters() local 87 dims.kernel_size.resize(num_spatial_dims); in ComputeResizeConvolutionParameters() 88 dims.stride.resize(num_spatial_dims); in ComputeResizeConvolutionParameters() 89 for (int i = 0; i < num_spatial_dims; ++i) { in ComputeResizeConvolutionParameters() 228 const int num_spatial_dims, absl::Span<const int64> in_size, in ResizeUsingDilationAndConvolution() argument 244 dimension_numbers.set_input_feature_dimension(num_spatial_dims + 1); in ResizeUsingDilationAndConvolution() 245 dimension_numbers.set_output_feature_dimension(num_spatial_dims + 1); in ResizeUsingDilationAndConvolution() 246 for (int i = 0; i < num_spatial_dims; ++i) { in ResizeUsingDilationAndConvolution() 251 dimension_numbers.set_kernel_input_feature_dimension(num_spatial_dims + 1); in ResizeUsingDilationAndConvolution() 252 dimension_numbers.set_kernel_output_feature_dimension(num_spatial_dims); in ResizeUsingDilationAndConvolution() [all …]
|
D | spacetodepth_op.cc | 70 int num_spatial_dims = GetTensorSpatialDims(input_rank, data_format); in Compile() local 80 for (int i = 0; i < num_spatial_dims; ++i) { in Compile() 89 for (int i = 0; i < num_spatial_dims; ++i) { in Compile() 96 for (int i = 0; i < num_spatial_dims; ++i) { in Compile() 99 for (int i = 0; i < num_spatial_dims; ++i) { in Compile() 102 transpose_order.push_back(feature_dim + num_spatial_dims); in Compile() 105 for (int i = 0; i < num_spatial_dims; ++i) { in Compile() 112 for (int i = 0; i < num_spatial_dims; ++i) { in Compile() 122 for (int i = 0; i < num_spatial_dims; ++i) { in Compile() 128 for (int i = 0; i < num_spatial_dims; ++i) { in Compile() [all …]
|
D | conv_ops.cc | 44 explicit ConvOp(OpKernelConstruction* ctx, int num_spatial_dims, in ConvOp() argument 48 ConvOpAttrs::Create(num_spatial_dims, depthwise, ctx); in ConvOp() 91 explicit ConvBackpropInputOp(OpKernelConstruction* ctx, int num_spatial_dims, in ConvBackpropInputOp() argument 95 ConvOpAttrs::Create(num_spatial_dims, depthwise, ctx); in ConvBackpropInputOp() 149 explicit ConvBackpropFilterOp(OpKernelConstruction* ctx, int num_spatial_dims, in ConvBackpropFilterOp() argument 153 ConvOpAttrs::Create(num_spatial_dims, depthwise, ctx); in ConvBackpropFilterOp()
|
D | pooling_ops.cc | 41 PoolingOp(OpKernelConstruction* ctx, int num_spatial_dims, in PoolingOp() argument 44 num_spatial_dims_(num_spatial_dims), in PoolingOp() 136 int num_spatial_dims) { in XlaTensorFormat() argument 137 int num_dims = num_spatial_dims + 2; in XlaTensorFormat() 140 absl::InlinedVector<int64, 4> spatial_dimensions(num_spatial_dims); in XlaTensorFormat() 141 for (int spatial_dim = 0; spatial_dim < num_spatial_dims; ++spatial_dim) { in XlaTensorFormat() 152 MaxPoolOp(OpKernelConstruction* ctx, int num_spatial_dims) in MaxPoolOp() argument 153 : PoolingOp(ctx, /*num_spatial_dims=*/num_spatial_dims, in MaxPoolOp() 204 AvgPoolOp(OpKernelConstruction* ctx, int num_spatial_dims) in AvgPoolOp() argument 205 : PoolingOp(ctx, /*num_spatial_dims=*/num_spatial_dims, in AvgPoolOp() [all …]
|
D | conv_op_helpers.h | 42 static xla::StatusOr<ConvOpAttrs> Create(int num_spatial_dims, bool depthwise, 46 int num_spatial_dims; member
|
/external/tensorflow/tensorflow/compiler/xla/client/lib/ |
D | pooling.cc | 35 const int num_spatial_dims = spatial_padding.size(); in AvgPoolDivideByCountWithGeneralPadding() local 37 std::vector<int64> input_dim_sizes(num_spatial_dims); in AvgPoolDivideByCountWithGeneralPadding() 38 std::vector<int64> window_dims(num_spatial_dims); in AvgPoolDivideByCountWithGeneralPadding() 39 std::vector<int64> window_ksize(num_spatial_dims); in AvgPoolDivideByCountWithGeneralPadding() 40 std::vector<int64> window_stride(num_spatial_dims); in AvgPoolDivideByCountWithGeneralPadding() 41 CHECK_EQ(data_format.num_spatial_dims(), num_spatial_dims) in AvgPoolDivideByCountWithGeneralPadding() 43 for (int i = 0; i < num_spatial_dims; ++i) { in AvgPoolDivideByCountWithGeneralPadding() 55 for (int i = 0; i < num_spatial_dims; ++i) { in AvgPoolDivideByCountWithGeneralPadding() 91 int num_spatial_dims, absl::Span<const int64> stride, in MakeSpatialPaddingConfig() argument 94 for (int i = 0; i < 2 + num_spatial_dims; ++i) { in MakeSpatialPaddingConfig() [all …]
|
D | pooling_test.cc | 25 TensorFormat MakeNCHWFormat(int num_spatial_dims) { in MakeNCHWFormat() argument 27 for (int i = 0; i < num_spatial_dims; ++i) { in MakeNCHWFormat() 51 const int num_spatial_dims = spatial_dim_sizes.size(); in ExpandWithBatchAndFeatureDimensions() local 52 std::vector<int64> tensor_sizes(num_spatial_dims + 2, 1); in ExpandWithBatchAndFeatureDimensions() 53 for (int i = 0; i < num_spatial_dims; ++i) { in ExpandWithBatchAndFeatureDimensions()
|
D | pooling.h | 40 int num_spatial_dims() const { return spatial_dimensions_.size(); } in num_spatial_dims() function
|
/external/tensorflow/tensorflow/compiler/xla/service/cpu/ |
D | conv_canonicalization.cc | 45 const int64 num_spatial_dims = dnums.output_spatial_dimensions_size(); in Run() local 46 const int64 num_dims = num_spatial_dims + 2; in Run() 63 for (int64 i = 0; i < num_spatial_dims; ++i) { in Run() 82 for (int64 i = 0; i < num_spatial_dims; ++i) { in Run() 106 for (int64 i = 0; i < num_spatial_dims; ++i) { in Run() 119 for (int64 i = 0; i < num_spatial_dims; ++i) { in Run()
|
D | ir_emission_utils.cc | 87 const int64 num_spatial_dims = dnums.output_spatial_dimensions_size(); in PotentiallyImplementedAsEigenConvolution() local 88 if (num_spatial_dims > 2) { in PotentiallyImplementedAsEigenConvolution() 92 for (int64 i = 0; i < num_spatial_dims; ++i) { in PotentiallyImplementedAsEigenConvolution()
|
D | ir_emitter.cc | 961 int num_spatial_dims = dnums.output_spatial_dimensions_size(); in EmitElementalConvolution() local 962 std::vector<llvm::Value*> output_spatial(num_spatial_dims); in EmitElementalConvolution() 963 for (int i = 0; i < num_spatial_dims; ++i) { in EmitElementalConvolution() 981 std::vector<llvm::Value*> kernel_spatial(num_spatial_dims); in EmitElementalConvolution() 982 for (int i = 0; i < num_spatial_dims; ++i) { in EmitElementalConvolution() 1011 std::vector<llvm::Value*> input_spatial(num_spatial_dims); in EmitElementalConvolution() 1012 for (int i = 0; i < num_spatial_dims; ++i) { in EmitElementalConvolution() 1031 for (int i = 0; i < num_spatial_dims; ++i) { in EmitElementalConvolution() 1047 for (int i = 0; i < num_spatial_dims; ++i) { in EmitElementalConvolution() 1057 int num_dims = num_spatial_dims + 2; in EmitElementalConvolution() [all …]
|
/external/tensorflow/tensorflow/core/kernels/ |
D | conv_grad_ops.cc | 99 StringPiece label, int num_spatial_dims, const TensorShape& input_shape, in ConvBackpropComputeDimensionsV2() argument 105 const int num_dims = num_spatial_dims + 2; in ConvBackpropComputeDimensionsV2() 143 dims->spatial_dims.resize(num_spatial_dims); in ConvBackpropComputeDimensionsV2() 144 for (int i = 0; i < num_spatial_dims; ++i) { in ConvBackpropComputeDimensionsV2() 159 Status ConvBackpropComputeDimensions(StringPiece label, int num_spatial_dims, in ConvBackpropComputeDimensions() argument 168 label, num_spatial_dims, input_shape, filter_shape, out_backprop_shape, in ConvBackpropComputeDimensions()
|
D | conv_grad_ops.h | 258 Status ConvBackpropComputeDimensions(StringPiece label, int num_spatial_dims, 270 StringPiece label, int num_spatial_dims, const TensorShape& input_shape,
|
/external/tensorflow/tensorflow/python/ops/ |
D | nn_ops.py | 467 def build_op(num_spatial_dims, padding): argument 468 return lambda inp, _: op(inp, num_spatial_dims, padding) 518 num_spatial_dims = rate_shape.dims[0].value 527 num_spatial_dims + starting_spatial_dim) 553 self.call = build_op(num_spatial_dims, padding) 569 const_filter_shape, num_spatial_dims, rate_or_const_rate) 571 self.num_spatial_dims = num_spatial_dims 575 self.base_paddings = np.zeros([num_spatial_dims, 2], np.int32) 583 self.op = build_op(num_spatial_dims, "VALID") 606 filter_shape, self.num_spatial_dims, self.rate_or_const_rate) [all …]
|
/external/tensorflow/tensorflow/contrib/fused_conv/ops/ |
D | fused_conv2d_bias_activation_op.cc | 63 constexpr int num_spatial_dims = 2; in __anon4e6e467d0102() local 65 GetTensorDimsFromSpatialDims(num_spatial_dims, data_format); in __anon4e6e467d0102() 71 GetFilterDimIndex<num_spatial_dims>(filter_format, 'O')); in __anon4e6e467d0102()
|
/external/tensorflow/tensorflow/core/framework/ |
D | common_shape_fns.cc | 431 constexpr int num_spatial_dims = 2; in Conv2DShapeImpl() local 432 const int rank = GetTensorDimsFromSpatialDims(num_spatial_dims, data_format); in Conv2DShapeImpl() 477 filter_shape, GetFilterDimIndex<num_spatial_dims>(filter_format, 'O')); in Conv2DShapeImpl() 479 filter_shape, GetFilterDimIndex<num_spatial_dims>(filter_format, 'H')); in Conv2DShapeImpl() 481 filter_shape, GetFilterDimIndex<num_spatial_dims>(filter_format, 'W')); in Conv2DShapeImpl() 486 GetFilterDimIndex<num_spatial_dims>(filter_format, 'I')), in Conv2DShapeImpl() 492 filter_shape, GetFilterDimIndex<num_spatial_dims>(filter_format, 'I')); in Conv2DShapeImpl() 758 constexpr int num_spatial_dims = 2; in AvgPoolShape() local 760 input_shape, GetTensorDimIndex<num_spatial_dims>(data_format, 'N')); in AvgPoolShape() 762 input_shape, GetTensorDimIndex<num_spatial_dims>(data_format, 'H')); in AvgPoolShape() [all …]
|
/external/tensorflow/tensorflow/python/kernel_tests/ |
D | atrous_convolution_test.py | 52 num_spatial_dims = len(rate) 53 spatial_shape = np.array(filters.shape[:num_spatial_dims]) 57 output[tuple(np.s_[::rate[i]] for i in range(num_spatial_dims))] = filters 221 …def combined_op(converted_input, num_spatial_dims, padding_arg): # pylint: disable=unused-argument argument
|
/external/tensorflow/tensorflow/compiler/tests/ |
D | xla_ops_test.py | 112 num_spatial_dims = 1 119 dnums.input_spatial_dimensions.extend(range(2, 2 + num_spatial_dims)) 120 dnums.kernel_spatial_dimensions.extend(range(2, 2 + num_spatial_dims)) 121 dnums.output_spatial_dimensions.extend(range(2, 2 + num_spatial_dims))
|
/external/tensorflow/tensorflow/core/ops/ |
D | array_ops.cc | 2323 constexpr int num_spatial_dims = 2; in __anon7c94107b3702() local 2325 GetTensorDimsFromSpatialDims(num_spatial_dims, data_format); in __anon7c94107b3702() 2333 c->Dim(input, GetTensorDimIndex<num_spatial_dims>(data_format, 'N')); in __anon7c94107b3702() 2335 c->Dim(input, GetTensorDimIndex<num_spatial_dims>(data_format, 'H')); in __anon7c94107b3702() 2337 c->Dim(input, GetTensorDimIndex<num_spatial_dims>(data_format, 'W')); in __anon7c94107b3702() 2339 c->Dim(input, GetTensorDimIndex<num_spatial_dims>(data_format, 'C')); in __anon7c94107b3702() 2377 constexpr int num_spatial_dims = 2; in __anon7c94107b3802() local 2379 GetTensorDimsFromSpatialDims(num_spatial_dims, data_format); in __anon7c94107b3802() 2388 c->Dim(input, GetTensorDimIndex<num_spatial_dims>(data_format, 'N')); in __anon7c94107b3802() 2390 c->Dim(input, GetTensorDimIndex<num_spatial_dims>(data_format, 'H')); in __anon7c94107b3802() [all …]
|
/external/tensorflow/tensorflow/compiler/xla/service/ |
D | shape_inference.cc | 1618 const int num_spatial_dims = dnums.input_spatial_dimensions_size(); in InferConvolveShape() local 1619 if (window.dimensions_size() != num_spatial_dims) { in InferConvolveShape() 1626 const int num_dims = num_spatial_dims + 2; in InferConvolveShape() 1694 std::vector<int64> input_spatial_dims(num_spatial_dims); in InferConvolveShape() 1695 for (int i = 0; i < num_spatial_dims; ++i) { in InferConvolveShape() 1701 std::vector<int64> kernel_spatial_dims(num_spatial_dims); in InferConvolveShape() 1702 for (int i = 0; i < num_spatial_dims; ++i) { in InferConvolveShape() 1761 std::vector<int64> window_dims(num_spatial_dims); in InferConvolveShape() 1762 for (int i = 0; i < num_spatial_dims; ++i) { in InferConvolveShape() 1785 for (int i = 0; i < num_spatial_dims; ++i) { in InferConvolveShape()
|