Remove comments used for indivisual testing
Change unproper function names Remove unnecessary template<>
This commit is contained in:
parent
0854f07291
commit
0245e05cc8
@ -85,19 +85,18 @@ INSTANTIATE_TEST_SUITE_P(Convolution2D_ExplicitPadding, ConvolutionLayerTest,
|
|||||||
ConvolutionLayerTest::getTestCaseName);
|
ConvolutionLayerTest::getTestCaseName);
|
||||||
// ! [test_convolution:instantiate]
|
// ! [test_convolution:instantiate]
|
||||||
|
|
||||||
//INSTANTIATE_TEST_SUITE_P(Convolution2D_AutoPadValid, ConvolutionLayerTest,
|
INSTANTIATE_TEST_SUITE_P(Convolution2D_AutoPadValidStaticShape, ConvolutionLayerTest,
|
||||||
// ::testing::Combine(
|
::testing::Combine(
|
||||||
// conv2DParams_AutoPadValid,
|
conv2DParams_AutoPadValid,
|
||||||
// ::testing::ValuesIn(netPrecisions),
|
::testing::ValuesIn(netPrecisions),
|
||||||
// ::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
|
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
|
||||||
// ::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
|
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
|
||||||
// ::testing::Values(InferenceEngine::Layout::ANY),
|
::testing::Values(InferenceEngine::Layout::ANY),
|
||||||
// ::testing::Values(InferenceEngine::Layout::ANY),
|
::testing::Values(InferenceEngine::Layout::ANY),
|
||||||
// ::testing::Values(std::vector<std::pair<size_t, size_t>>(NULL_RANGE),
|
::testing::Values(std::vector<std::pair<size_t, size_t>>(NULL_RANGE)),
|
||||||
// std::vector<std::pair<size_t, size_t>>({{1, 10}, {3, 30}, {30, 300}, {30, 300}})),
|
::testing::Values(std::vector<std::vector<size_t>>({{1, 3, 30, 30}})),
|
||||||
// ::testing::Values(std::vector<size_t >({1, 3, 30, 30})),
|
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)),
|
||||||
// ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)),
|
ConvolutionLayerTest::getTestCaseName);
|
||||||
// ConvolutionLayerTest::getTestCaseName);
|
|
||||||
|
|
||||||
/* ============= 3D Convolution ============= */
|
/* ============= 3D Convolution ============= */
|
||||||
|
|
||||||
@ -130,32 +129,30 @@ const auto conv3DParams_AutoPadValid = ::testing::Combine(
|
|||||||
::testing::Values(ngraph::op::PadType::VALID)
|
::testing::Values(ngraph::op::PadType::VALID)
|
||||||
);
|
);
|
||||||
|
|
||||||
//INSTANTIATE_TEST_SUITE_P(smoke_Convolution3D_ExplicitPadding, ConvolutionLayerTest,
|
INSTANTIATE_TEST_SUITE_P(smoke_Convolution3D_ExplicitPaddingStaticShape, ConvolutionLayerTest,
|
||||||
// ::testing::Combine(
|
::testing::Combine(
|
||||||
// conv3DParams_ExplicitPadding,
|
conv3DParams_ExplicitPadding,
|
||||||
// ::testing::ValuesIn(netPrecisions),
|
::testing::ValuesIn(netPrecisions),
|
||||||
// ::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
|
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
|
||||||
// ::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
|
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
|
||||||
// ::testing::Values(InferenceEngine::Layout::ANY),
|
::testing::Values(InferenceEngine::Layout::ANY),
|
||||||
// ::testing::Values(InferenceEngine::Layout::ANY),
|
::testing::Values(InferenceEngine::Layout::ANY),
|
||||||
// ::testing::Values(std::vector<std::pair<size_t, size_t>>(NULL_RANGE),
|
::testing::Values(std::vector<std::pair<size_t, size_t>>(NULL_RANGE)),
|
||||||
// std::vector<std::pair<size_t, size_t>>({{1, 10}, {3, 30}, {10, 100}, {10, 100}, {10, 100}})),
|
::testing::Values(std::vector<std::vector<size_t> >({{1, 3, 10, 10, 10}})),
|
||||||
// ::testing::Values(std::vector<size_t >({1, 3, 10, 10, 10})),
|
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)),
|
||||||
// ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)),
|
ConvolutionLayerTest::getTestCaseName);
|
||||||
// ConvolutionLayerTest::getTestCaseName);
|
|
||||||
|
|
||||||
//INSTANTIATE_TEST_SUITE_P(nightly_Convolution3D_AutoPadValid, ConvolutionLayerTest,
|
INSTANTIATE_TEST_SUITE_P(nightly_Convolution3D_AutoPadValidStaticShape, ConvolutionLayerTest,
|
||||||
// ::testing::Combine(
|
::testing::Combine(
|
||||||
// conv3DParams_AutoPadValid,
|
conv3DParams_AutoPadValid,
|
||||||
// ::testing::ValuesIn(netPrecisions),
|
::testing::ValuesIn(netPrecisions),
|
||||||
// ::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
|
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
|
||||||
// ::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
|
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
|
||||||
// ::testing::Values(InferenceEngine::Layout::ANY),
|
::testing::Values(InferenceEngine::Layout::ANY),
|
||||||
// ::testing::Values(InferenceEngine::Layout::ANY),
|
::testing::Values(InferenceEngine::Layout::ANY),
|
||||||
// ::testing::Values(std::vector<std::pair<size_t, size_t>>(NULL_RANGE),
|
::testing::Values(std::vector<std::pair<size_t, size_t>>(NULL_RANGE)),
|
||||||
// std::vector<std::pair<size_t, size_t>>({{1, 10}, {3, 30}, {10, 100}, {10, 100}, {10, 100}})),
|
::testing::Values(std::vector<std::vector<size_t> >({{1, 3, 10, 10, 10}})),
|
||||||
// ::testing::Values(std::vector<size_t >({1, 3, 10, 10, 10})),
|
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)),
|
||||||
// ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)),
|
ConvolutionLayerTest::getTestCaseName);
|
||||||
// ConvolutionLayerTest::getTestCaseName);
|
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
@ -78,31 +78,60 @@ INSTANTIATE_TEST_SUITE_P(
|
|||||||
SoftMaxLayerTest::getTestCaseName
|
SoftMaxLayerTest::getTestCaseName
|
||||||
);
|
);
|
||||||
|
|
||||||
const std::vector<InferenceEngine::SizeVector> inputShapes4D = {
|
const std::vector<std::vector<std::pair<size_t, size_t>>> inputStaticShape4D = {
|
||||||
InferenceEngine::SizeVector {1, 100, 1, 1},
|
{NULL_RANGE}
|
||||||
InferenceEngine::SizeVector {1, 3, 4, 3},
|
};
|
||||||
InferenceEngine::SizeVector {2, 3, 4, 5},
|
|
||||||
|
const std::vector<std::vector<std::pair<size_t, size_t>>> inputShape4D = {
|
||||||
|
{{1, 200}, {1, 200}, {1, 200}, {1, 200}}
|
||||||
|
};
|
||||||
|
|
||||||
|
const std::vector<std::vector<InferenceEngine::SizeVector>> targetShapes4D = {
|
||||||
|
{InferenceEngine::SizeVector {1, 100, 1, 1}},
|
||||||
|
{InferenceEngine::SizeVector {1, 3, 4, 3}},
|
||||||
|
{InferenceEngine::SizeVector {2, 3, 4, 5}},
|
||||||
};
|
};
|
||||||
|
|
||||||
const std::vector<size_t> axis4D = {0, 1, 2, 3};
|
const std::vector<size_t> axis4D = {0, 1, 2, 3};
|
||||||
|
|
||||||
|
const auto params4DStaticShape = testing::Combine(
|
||||||
|
testing::ValuesIn(netPrecision),
|
||||||
|
testing::Values(InferenceEngine::Precision::UNSPECIFIED),
|
||||||
|
testing::Values(InferenceEngine::Precision::UNSPECIFIED),
|
||||||
|
testing::Values(InferenceEngine::Layout::NCHW),
|
||||||
|
testing::Values(InferenceEngine::Layout::ANY),
|
||||||
|
testing::ValuesIn(inputStaticShape4D),
|
||||||
|
testing::ValuesIn(targetShapes4D),
|
||||||
|
testing::ValuesIn(axis4D),
|
||||||
|
testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
|
||||||
|
testing::Values(std::map<std::string, std::string>())
|
||||||
|
);
|
||||||
|
|
||||||
const auto params4D = testing::Combine(
|
const auto params4D = testing::Combine(
|
||||||
testing::ValuesIn(netPrecision),
|
testing::ValuesIn(netPrecision),
|
||||||
testing::Values(InferenceEngine::Precision::UNSPECIFIED),
|
testing::Values(InferenceEngine::Precision::UNSPECIFIED),
|
||||||
testing::Values(InferenceEngine::Precision::UNSPECIFIED),
|
testing::Values(InferenceEngine::Precision::UNSPECIFIED),
|
||||||
testing::Values(InferenceEngine::Layout::NCHW),
|
testing::Values(InferenceEngine::Layout::NCHW),
|
||||||
testing::Values(InferenceEngine::Layout::ANY),
|
testing::Values(InferenceEngine::Layout::ANY),
|
||||||
testing::ValuesIn(inputShapes4D),
|
testing::ValuesIn(inputShape4D),
|
||||||
|
testing::ValuesIn(targetShapes4D),
|
||||||
testing::ValuesIn(axis4D),
|
testing::ValuesIn(axis4D),
|
||||||
testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
|
testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
|
||||||
testing::Values(std::map<std::string, std::string>())
|
testing::Values(std::map<std::string, std::string>())
|
||||||
);
|
);
|
||||||
|
|
||||||
//INSTANTIATE_TEST_SUITE_P(
|
INSTANTIATE_TEST_SUITE_P(
|
||||||
// smoke_SoftMax4D,
|
smoke_SoftMax4DStaticShape,
|
||||||
// SoftMaxLayerTest,
|
SoftMaxLayerTest,
|
||||||
// params4D,
|
params4DStaticShape,
|
||||||
// SoftMaxLayerTest::getTestCaseName
|
SoftMaxLayerTest::getTestCaseName
|
||||||
//);
|
);
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_SUITE_P(
|
||||||
|
smoke_SoftMax4D,
|
||||||
|
SoftMaxLayerTest,
|
||||||
|
params4D,
|
||||||
|
SoftMaxLayerTest::getTestCaseName
|
||||||
|
);
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
@ -44,7 +44,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
void SetUp() override;
|
void SetUp() override;
|
||||||
void makeConvolutionFunction();
|
void makeConvolution();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
InferenceEngine::Precision::ePrecision netPrecision = InferenceEngine::Precision::UNSPECIFIED;
|
InferenceEngine::Precision::ePrecision netPrecision = InferenceEngine::Precision::UNSPECIFIED;
|
||||||
|
@ -36,7 +36,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
void SetUp() override;
|
void SetUp() override;
|
||||||
void makeSoftMaxFunction();
|
void makeSoftMax();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
InferenceEngine::Precision netPrecision;
|
InferenceEngine::Precision netPrecision;
|
||||||
|
@ -317,13 +317,13 @@ void LayerTestsCommon::ConfigureNetwork() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::map<std::string, ngraph::PartialShape> shapes;
|
std::map<std::string, ngraph::PartialShape> inputShapes;
|
||||||
auto isdm = cnnNetwork.getInputsInfo();
|
auto inputsDataMap = cnnNetwork.getInputsInfo();
|
||||||
for (auto&& idm : isdm) {
|
for (auto&& inputDataMap : inputsDataMap) {
|
||||||
shapes[idm.first] = isdm[idm.first]->getInputData()->getPartialShape();
|
inputShapes[inputDataMap.first] = inputsDataMap[inputDataMap.first]->getInputData()->getPartialShape();
|
||||||
shapes[idm.first] = std::vector<ngraph::Dimension>(inputDynamicShape);
|
inputShapes[inputDataMap.first] = std::vector<ngraph::Dimension>(inputDynamicShape);
|
||||||
}
|
}
|
||||||
cnnNetwork.reshape(shapes);
|
cnnNetwork.reshape(inputShapes);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LayerTestsCommon::LoadNetwork() {
|
void LayerTestsCommon::LoadNetwork() {
|
||||||
|
@ -57,10 +57,10 @@ void ConvolutionLayerTest::SetUp() {
|
|||||||
std::tie(kernel, stride, padBegin, padEnd, dilation, convOutChannels, padType) = convParams;
|
std::tie(kernel, stride, padBegin, padEnd, dilation, convOutChannels, padType) = convParams;
|
||||||
|
|
||||||
setTargetStaticShape(targetStaticShapes[0]);
|
setTargetStaticShape(targetStaticShapes[0]);
|
||||||
makeConvolutionFunction();
|
makeConvolution();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConvolutionLayerTest::makeConvolutionFunction() {
|
void ConvolutionLayerTest::makeConvolution() {
|
||||||
auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision);
|
auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision);
|
||||||
auto params = ngraph::builder::makeParams(ngPrc, {targetStaticShape});
|
auto params = ngraph::builder::makeParams(ngPrc, {targetStaticShape});
|
||||||
auto paramOuts = ngraph::helpers::convert2OutputVector(
|
auto paramOuts = ngraph::helpers::convert2OutputVector(
|
||||||
|
@ -45,10 +45,10 @@ void SoftMaxLayerTest::SetUp() {
|
|||||||
|
|
||||||
inputDynamicShape = FuncTestUtils::PartialShapeUtils::vec2partialshape(inputShape, targetStaticShapes[0]);
|
inputDynamicShape = FuncTestUtils::PartialShapeUtils::vec2partialshape(inputShape, targetStaticShapes[0]);
|
||||||
|
|
||||||
makeSoftMaxFunction();
|
makeSoftMax();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SoftMaxLayerTest::makeSoftMaxFunction() {
|
void SoftMaxLayerTest::makeSoftMax() {
|
||||||
const auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision);
|
const auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision);
|
||||||
const auto params = ngraph::builder::makeParams(ngPrc, {targetStaticShape});
|
const auto params = ngraph::builder::makeParams(ngPrc, {targetStaticShape});
|
||||||
const auto paramOuts =
|
const auto paramOuts =
|
||||||
|
@ -53,7 +53,6 @@ inline std::string pair2str(const std::pair<size_t, size_t>& p) {
|
|||||||
return result.str();
|
return result.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
|
||||||
inline std::string vec2str(const std::vector<std::pair<size_t, size_t>> &vec) {
|
inline std::string vec2str(const std::vector<std::pair<size_t, size_t>> &vec) {
|
||||||
std::ostringstream result;
|
std::ostringstream result;
|
||||||
for (const auto &p : vec) {
|
for (const auto &p : vec) {
|
||||||
|
Loading…
Reference in New Issue
Block a user