diff options
-rw-r--r-- | tests/datasets_new/LargeConvolutionLayerDataset.h | 19 | ||||
-rw-r--r-- | tests/datasets_new/ShapeDatasets.h | 37 | ||||
-rw-r--r-- | tests/datasets_new/SmallConvolutionLayerDataset.h | 14 |
3 files changed, 64 insertions, 6 deletions
diff --git a/tests/datasets_new/LargeConvolutionLayerDataset.h b/tests/datasets_new/LargeConvolutionLayerDataset.h index 6fef77009e..36692f9881 100644 --- a/tests/datasets_new/LargeConvolutionLayerDataset.h +++ b/tests/datasets_new/LargeConvolutionLayerDataset.h @@ -42,6 +42,7 @@ class LargeConvolutionLayerDataset final : public ConvolutionLayerDataset public: LargeConvolutionLayerDataset() { + // Batch size 1 add_config(TensorShape(227U, 227U, 3U), TensorShape(11U, 11U, 3U, 96U), TensorShape(96U), TensorShape(55U, 55U, 96U), PadStrideInfo(4, 4, 0, 0)); add_config(TensorShape(27U, 27U, 96U), TensorShape(5U, 5U, 96U, 256U), TensorShape(256U), TensorShape(27U, 27U, 256U), PadStrideInfo(1, 1, 2, 2)); add_config(TensorShape(13U, 13U, 256U), TensorShape(3U, 3U, 256U, 384U), TensorShape(384U), TensorShape(13U, 13U, 384U), PadStrideInfo(1, 1, 1, 1)); @@ -49,6 +50,24 @@ public: add_config(TensorShape(13U, 13U, 384U), TensorShape(3U, 3U, 384U, 256U), TensorShape(256U), TensorShape(13U, 13U, 256U), PadStrideInfo(1, 1, 1, 1)); add_config(TensorShape(224U, 224U, 3U), TensorShape(7U, 7U, 3U, 64U), TensorShape(64U), TensorShape(112U, 112U, 64U), PadStrideInfo(2, 2, 3, 3)); add_config(TensorShape(28U, 28U, 256U), TensorShape(1U, 1U, 256U, 64U), TensorShape(64U), TensorShape(28U, 28U, 64U), PadStrideInfo(1, 1, 0, 0)); + // Batch size 4 + add_config(TensorShape(227U, 227U, 3U, 4U), TensorShape(11U, 11U, 3U, 96U), TensorShape(96U), TensorShape(55U, 55U, 96U, 4U), PadStrideInfo(4, 4, 0, 0)); + add_config(TensorShape(27U, 27U, 96U, 4U), TensorShape(5U, 5U, 96U, 256U), TensorShape(256U), TensorShape(27U, 27U, 256U, 4U), PadStrideInfo(1, 1, 2, 2)); + add_config(TensorShape(13U, 13U, 256U, 4U), TensorShape(3U, 3U, 256U, 384U), TensorShape(384U), TensorShape(13U, 13U, 384U, 4U), PadStrideInfo(1, 1, 1, 1)); + add_config(TensorShape(13U, 13U, 384U, 4U), TensorShape(3U, 3U, 384U, 384U), TensorShape(384U), TensorShape(13U, 13U, 384U, 4U), PadStrideInfo(1, 1, 1, 1)); + add_config(TensorShape(13U, 13U, 384U, 4U), TensorShape(3U, 3U, 384U, 256U), TensorShape(256U), TensorShape(13U, 13U, 256U, 4U), PadStrideInfo(1, 1, 1, 1)); + add_config(TensorShape(224U, 224U, 3U, 4U), TensorShape(7U, 7U, 3U, 64U), TensorShape(64U), TensorShape(112U, 112U, 64U, 4U), PadStrideInfo(2, 2, 3, 3)); + add_config(TensorShape(28U, 28U, 256U, 4U), TensorShape(1U, 1U, 256U, 64U), TensorShape(64U), TensorShape(28U, 28U, 64U, 4U), PadStrideInfo(1, 1, 0, 0)); + // Batch size 8 + add_config(TensorShape(227U, 227U, 3U, 8U), TensorShape(11U, 11U, 3U, 96U), TensorShape(96U), TensorShape(55U, 55U, 96U, 8U), PadStrideInfo(4, 4, 0, 0)); + add_config(TensorShape(27U, 27U, 96U, 8U), TensorShape(5U, 5U, 96U, 256U), TensorShape(256U), TensorShape(27U, 27U, 256U, 8U), PadStrideInfo(1, 1, 2, 2)); + add_config(TensorShape(13U, 13U, 256U, 8U), TensorShape(3U, 3U, 256U, 384U), TensorShape(384U), TensorShape(13U, 13U, 384U, 8U), PadStrideInfo(1, 1, 1, 1)); + add_config(TensorShape(13U, 13U, 384U, 8U), TensorShape(3U, 3U, 384U, 384U), TensorShape(384U), TensorShape(13U, 13U, 384U, 8U), PadStrideInfo(1, 1, 1, 1)); + add_config(TensorShape(13U, 13U, 384U, 8U), TensorShape(3U, 3U, 384U, 256U), TensorShape(256U), TensorShape(13U, 13U, 256U, 8U), PadStrideInfo(1, 1, 1, 1)); + add_config(TensorShape(224U, 224U, 3U, 8U), TensorShape(7U, 7U, 3U, 64U), TensorShape(64U), TensorShape(112U, 112U, 64U, 8U), PadStrideInfo(2, 2, 3, 3)); + add_config(TensorShape(28U, 28U, 256U, 8U), TensorShape(1U, 1U, 256U, 64U), TensorShape(64U), TensorShape(28U, 28U, 64U, 8U), PadStrideInfo(1, 1, 0, 0)); + // Arbitrary batch size + add_config(TensorShape(227U, 227U, 3U, 5U), TensorShape(11U, 11U, 3U, 96U), TensorShape(96U), TensorShape(55U, 55U, 96U, 5U), PadStrideInfo(4, 4, 0, 0)); } }; } // namespace datasets diff --git a/tests/datasets_new/ShapeDatasets.h b/tests/datasets_new/ShapeDatasets.h index f6cd3f2d0e..a693be7153 100644 --- a/tests/datasets_new/ShapeDatasets.h +++ b/tests/datasets_new/ShapeDatasets.h @@ -70,9 +70,16 @@ public: SmallShapes() : ShapeDataset("Shape", { + // Batch size 1 TensorShape{ 7U, 7U }, TensorShape{ 27U, 13U, 2U }, - TensorShape{ 128U, 64U, 1U, 3U } + TensorShape{ 128U, 64U, 1U, 3U }, + // Batch size 4 + TensorShape{ 7U, 7U, 4U }, + TensorShape{ 27U, 13U, 2U, 4U }, + TensorShape{ 128U, 64U, 1U, 3U, 4U }, + // Arbitrary batch size + TensorShape{ 7U, 7U, 5U } }) { } @@ -85,9 +92,20 @@ public: LargeShapes() : ShapeDataset("Shape", { + // Batch size 1 TensorShape{ 1920U, 1080U }, TensorShape{ 1245U, 652U, 1U, 3U }, - TensorShape{ 4160U, 3120U } + TensorShape{ 4160U, 3120U }, + // Batch size 4 + TensorShape{ 1920U, 1080U, 4U }, + TensorShape{ 1245U, 652U, 1U, 3U, 4U }, + TensorShape{ 4160U, 3120U, 4U }, + // Batch size 8 + TensorShape{ 1920U, 1080U, 8U }, + TensorShape{ 1245U, 652U, 1U, 3U, 8U }, + TensorShape{ 4160U, 3120U, 8U }, + // Arbitrary batch size + TensorShape{ 1920U, 1080U, 5U }, }) { } @@ -115,9 +133,20 @@ public: SmallDirectConvolutionShapes() : ShapeDataset("InputShape", { - TensorShape{ 5U, 5U, 3U, 2U, 4U, 5U }, + // Batch size 1 + TensorShape{ 5U, 5U, 3U }, TensorShape{ 32U, 37U, 3U }, - TensorShape{ 13U, 15U, 8U, 3U } + TensorShape{ 13U, 15U, 8U }, + // Batch size 4 + TensorShape{ 5U, 5U, 3U, 4U }, + TensorShape{ 32U, 37U, 3U, 4U }, + TensorShape{ 13U, 15U, 8U, 4U }, + // Batch size 8 + TensorShape{ 5U, 5U, 3U, 8U }, + TensorShape{ 32U, 37U, 3U, 8U }, + TensorShape{ 13U, 15U, 8U, 8U }, + // Arbitrary batch size + TensorShape{ 32U, 37U, 3U, 8U } }) { } diff --git a/tests/datasets_new/SmallConvolutionLayerDataset.h b/tests/datasets_new/SmallConvolutionLayerDataset.h index 2cd8da0b27..59765c4a51 100644 --- a/tests/datasets_new/SmallConvolutionLayerDataset.h +++ b/tests/datasets_new/SmallConvolutionLayerDataset.h @@ -42,12 +42,22 @@ class SmallConvolutionLayerDataset final : public ConvolutionLayerDataset public: SmallConvolutionLayerDataset() { + // Batch size 1 add_config(TensorShape(23U, 27U, 5U), TensorShape(3U, 3U, 5U, 21U), TensorShape(21U), TensorShape(11U, 25U, 21U), PadStrideInfo(2, 1, 0, 0)); add_config(TensorShape(33U, 27U, 7U), TensorShape(5U, 5U, 7U, 16U), TensorShape(16U), TensorShape(11U, 12U, 16U), PadStrideInfo(3, 2, 1, 0)); - add_config(TensorShape(17U, 31U, 2U, 7U), TensorShape(5U, 5U, 2U, 19U), TensorShape(19U), TensorShape(15U, 15U, 19U, 7U), PadStrideInfo(1, 2, 1, 1)); + add_config(TensorShape(17U, 31U, 2U), TensorShape(5U, 5U, 2U, 19U), TensorShape(19U), TensorShape(15U, 15U, 19U), PadStrideInfo(1, 2, 1, 1)); add_config(TensorShape(23U, 27U, 5U), TensorShape(3U, 1U, 5U, 21U), TensorShape(21U), TensorShape(11U, 27U, 21U), PadStrideInfo(2, 1, 0, 0)); add_config(TensorShape(33U, 27U, 7U), TensorShape(5U, 7U, 7U, 16U), TensorShape(16U), TensorShape(11U, 11U, 16U), PadStrideInfo(3, 2, 1, 0)); - add_config(TensorShape(17U, 31U, 2U, 7U), TensorShape(5U, 3U, 2U, 19U), TensorShape(19U), TensorShape(15U, 16U, 19U, 7U), PadStrideInfo(1, 2, 1, 1)); + add_config(TensorShape(17U, 31U, 2U), TensorShape(5U, 3U, 2U, 19U), TensorShape(19U), TensorShape(15U, 16U, 19U), PadStrideInfo(1, 2, 1, 1)); + // Batch size 4 + add_config(TensorShape(23U, 27U, 5U, 4U), TensorShape(3U, 3U, 5U, 21U), TensorShape(21U), TensorShape(11U, 25U, 21U, 4U), PadStrideInfo(2, 1, 0, 0)); + add_config(TensorShape(33U, 27U, 7U, 4U), TensorShape(5U, 5U, 7U, 16U), TensorShape(16U), TensorShape(11U, 12U, 16U, 4U), PadStrideInfo(3, 2, 1, 0)); + add_config(TensorShape(17U, 31U, 2U, 4U), TensorShape(5U, 5U, 2U, 19U), TensorShape(19U), TensorShape(15U, 15U, 19U, 4U), PadStrideInfo(1, 2, 1, 1)); + add_config(TensorShape(23U, 27U, 5U, 4U), TensorShape(3U, 1U, 5U, 21U), TensorShape(21U), TensorShape(11U, 27U, 21U, 4U), PadStrideInfo(2, 1, 0, 0)); + add_config(TensorShape(33U, 27U, 7U, 4U), TensorShape(5U, 7U, 7U, 16U), TensorShape(16U), TensorShape(11U, 11U, 16U, 4U), PadStrideInfo(3, 2, 1, 0)); + add_config(TensorShape(17U, 31U, 2U, 4U), TensorShape(5U, 3U, 2U, 19U), TensorShape(19U), TensorShape(15U, 16U, 19U, 4U), PadStrideInfo(1, 2, 1, 1)); + // Arbitrary batch size + add_config(TensorShape(33U, 27U, 7U, 5U), TensorShape(5U, 7U, 7U, 16U), TensorShape(16U), TensorShape(11U, 11U, 16U, 5U), PadStrideInfo(3, 2, 1, 0)); } }; } // namespace datasets |