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

Function MakeNCHWFormat

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

Source from the content-addressed store, hash-verified

23namespace {
24
25TensorFormat MakeNCHWFormat(int num_spatial_dims) {
26 absl::InlinedVector<int64, 4> spatial_dimensions;
27 for (int i = 0; i < num_spatial_dims; ++i) {
28 spatial_dimensions.push_back(i + 2);
29 }
30 return TensorFormat(/*batch_dimension=*/0, /*feature_dimension=*/1,
31 /*spatial_dimensions=*/spatial_dimensions);
32}
33
34std::vector<std::pair<int64, int64>> MakeGeneralPadding(
35 XlaOp input, absl::Span<const int64> kernel_size,

Callers 1

XLA_TEST_FFunction · 0.85

Calls 2

TensorFormatClass · 0.70
push_backMethod · 0.45

Tested by

no test coverage detected