MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / MakeGeneralPadding

Function MakeGeneralPadding

tensorflow/compiler/xla/client/lib/pooling_test.cc:34–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34std::vector<std::pair<int64, int64>> MakeGeneralPadding(
35 XlaOp input, absl::Span<const int64> kernel_size,
36 absl::Span<const int64> stride, Padding padding,
37 const xla::TensorFormat& data_format) {
38 XlaBuilder* b = input.builder();
39 Shape operand_shape = b->GetShape(input).ValueOrDie();
40 std::vector<int64> input_size(operand_shape.dimensions().begin(),
41 operand_shape.dimensions().end());
42 return MakeSpatialPadding(input_size, kernel_size, stride, padding,
43 data_format);
44}
45
46// Add singleton batch and feature dimensions to spatial dimensions, according
47// to 'data_format' specification.

Callers 1

XLA_TEST_FFunction · 0.85

Calls 6

MakeSpatialPaddingFunction · 0.85
builderMethod · 0.45
GetShapeMethod · 0.45
beginMethod · 0.45
dimensionsMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected