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