[CPU] NormalizeL2. Support 3D layout. (#3259)
This commit is contained in:
parent
92ec30c54b
commit
e4ec55bea4
@ -708,13 +708,10 @@ void MKLDNNNormalizeNode::getSupportedDescriptors() {
|
|||||||
if (inData == nullptr) {
|
if (inData == nullptr) {
|
||||||
THROW_IE_EXCEPTION << errPrefix << "has nullable input data.";
|
THROW_IE_EXCEPTION << errPrefix << "has nullable input data.";
|
||||||
}
|
}
|
||||||
const auto& layout = inData->getLayout();
|
|
||||||
const auto& inDims = inData->getDims();
|
const auto& inDims = inData->getDims();
|
||||||
size_t channels = 1lu;
|
if (inDims.size() < 2)
|
||||||
if (layout == Layout::NCHW || layout == Layout::NC)
|
THROW_IE_EXCEPTION << errPrefix << "has unsupported layout: '" << inData->getLayout() << "'.";
|
||||||
channels = inDims[1];
|
const size_t channels = inDims[1];
|
||||||
else
|
|
||||||
THROW_IE_EXCEPTION << errPrefix << "has unsupported layout: '" << layout << "'.";
|
|
||||||
const auto weightsSize = tweights->size();
|
const auto weightsSize = tweights->size();
|
||||||
if (weightsSize != channels) {
|
if (weightsSize != channels) {
|
||||||
if (weightsSize == 1) {
|
if (weightsSize == 1) {
|
||||||
|
@ -29,7 +29,7 @@ const auto normL2params = testing::Combine(
|
|||||||
testing::ValuesIn(axes),
|
testing::ValuesIn(axes),
|
||||||
testing::ValuesIn(eps),
|
testing::ValuesIn(eps),
|
||||||
testing::ValuesIn(epsMode),
|
testing::ValuesIn(epsMode),
|
||||||
testing::Values(std::vector<size_t>{1, 3, 10, 5}),
|
testing::ValuesIn(std::vector<std::vector<size_t>>({{1, 3, 10, 5}, {1, 5, 3}})),
|
||||||
testing::ValuesIn(netPrecisions),
|
testing::ValuesIn(netPrecisions),
|
||||||
testing::Values(CommonTestUtils::DEVICE_CPU)
|
testing::Values(CommonTestUtils::DEVICE_CPU)
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user