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

Function TEST_F

tensorflow/core/kernels/mkl_fused_ops_test.cc:747–773  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

745};
746
747TEST_F(FusedPadConvOpTest, PaddingConvTest) {
748 const int depth = 1;
749 const int image_width = 4;
750 const int image_height = 3;
751 const int image_batch_count = 1;
752 Tensor image(DT_FLOAT, {image_batch_count, image_height, image_width, depth});
753 test::FillValues<float>(&image, {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12});
754
755 const int kFilterSize = 3;
756 const int kFilterCount = 1;
757 Tensor filter(DT_FLOAT, {kFilterSize, kFilterSize, depth, kFilterCount});
758 test::FillValues<float>(&filter, {1, 4, 7, 2, 5, 8, 3, 6, 9});
759
760 const int padding_height = 4;
761 const int padding_width = 2;
762 Tensor padding(DT_INT32, {padding_height, padding_width});
763 test::FillValues<int32>(&padding, {0, 0, 3, 4, 1, 2, 0, 0});
764
765 Tensor expected(DT_FLOAT, TensorShape({1, 8, 5, 1}));
766 test::FillValues<float>(
767 &expected,
768 {0, 0, 0, 0, 0, 24, 42, 60, 33, 12, 105, 150, 183, 95,
769 32, 235, 312, 357, 178, 56, 187, 234, 261, 121, 32, 106, 126, 138,
770 59, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0});
771
772 Run<float>(DT_FLOAT, image, filter, padding, expected, "NHWC");
773}
774
775TEST_F(FusedPadConvOpTest, PaddingConvTestNchw) {
776 const int depth = 1;

Callers

nothing calls this directly

Calls 10

NodeDefBuilderClass · 0.85
DefaultFunction · 0.85
GetOutputFunction · 0.85
ConvertAndCompareMethod · 0.80
TensorShapeClass · 0.50
FakeInputFunction · 0.50
FinalizeMethod · 0.45
AttrMethod · 0.45
InputMethod · 0.45
NowMicrosMethod · 0.45

Tested by

no test coverage detected