aboutsummaryrefslogtreecommitdiff
path: root/src/armnn
diff options
context:
space:
mode:
authorAron Virginas-Tar <Aron.Virginas-Tar@arm.com>2019-07-01 19:01:44 +0100
committerÁron Virginás-Tar <aron.virginas-tar@arm.com>2019-07-02 13:50:24 +0000
commit169d2f120cc9021f170fede22a448fd6b66fc979 (patch)
treea55b62678a85f63c074148d33fae744b22c834a8 /src/armnn
parent38e05bd2836b1b65b440330a9c283038ba4192c3 (diff)
downloadarmnn-169d2f120cc9021f170fede22a448fd6b66fc979.tar.gz
IVGCVSW-3382 Deprecate ResizeBilinear and use Resize with Bilinear method
!android-nn-driver:1451 Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> Change-Id: Ieedbce1f6e95891137a250fdd07e2f7e4e1f4828
Diffstat (limited to 'src/armnn')
-rw-r--r--src/armnn/InternalTypes.cpp1
-rw-r--r--src/armnn/InternalTypes.hpp1
-rw-r--r--src/armnn/LayerSupport.cpp20
-rw-r--r--src/armnn/LayersFwd.hpp2
-rw-r--r--src/armnn/Network.cpp14
-rw-r--r--src/armnn/Network.hpp1
-rw-r--r--src/armnn/QuantizerVisitor.cpp12
-rw-r--r--src/armnn/QuantizerVisitor.hpp9
-rw-r--r--src/armnn/layers/ResizeBilinearLayer.cpp74
-rw-r--r--src/armnn/layers/ResizeBilinearLayer.hpp49
-rw-r--r--src/armnn/test/CreateWorkload.hpp29
-rw-r--r--src/armnn/test/OptimizerTests.cpp13
-rw-r--r--src/armnn/test/QuantizerTest.cpp48
-rw-r--r--src/armnn/test/TestNameAndDescriptorLayerVisitor.cpp18
-rw-r--r--src/armnn/test/TestNameAndDescriptorLayerVisitor.hpp30
15 files changed, 91 insertions, 230 deletions
diff --git a/src/armnn/InternalTypes.cpp b/src/armnn/InternalTypes.cpp
index 393e744f84..417581f010 100644
--- a/src/armnn/InternalTypes.cpp
+++ b/src/armnn/InternalTypes.cpp
@@ -52,7 +52,6 @@ char const* GetLayerTypeAsCString(LayerType type)
case LayerType::Reshape: return "Reshape";
case LayerType::Rsqrt: return "Rsqrt";
case LayerType::Resize: return "Resize";
- case LayerType::ResizeBilinear: return "ResizeBilinear";
case LayerType::Softmax: return "Softmax";
case LayerType::SpaceToBatchNd: return "SpaceToBatchNd";
case LayerType::Splitter: return "Splitter";
diff --git a/src/armnn/InternalTypes.hpp b/src/armnn/InternalTypes.hpp
index 6c49eaca3a..b097265d81 100644
--- a/src/armnn/InternalTypes.hpp
+++ b/src/armnn/InternalTypes.hpp
@@ -52,7 +52,6 @@ enum class LayerType
Prelu,
Quantize,
Reshape,
- ResizeBilinear,
Resize,
Rsqrt,
Softmax,
diff --git a/src/armnn/LayerSupport.cpp b/src/armnn/LayerSupport.cpp
index d1583a5df5..b2ca85c04e 100644
--- a/src/armnn/LayerSupport.cpp
+++ b/src/armnn/LayerSupport.cpp
@@ -507,13 +507,31 @@ bool IsReshapeSupported(const BackendId& backend,
FORWARD_LAYER_SUPPORT_FUNC(backend, IsReshapeSupported, input, descriptor);
}
+bool IsResizeSupported(const BackendId& backend,
+ const TensorInfo& input,
+ const TensorInfo& output,
+ const ResizeDescriptor& descriptor,
+ char* reasonIfUnsupported,
+ size_t reasonIfUnsupportedMaxLength)
+{
+ FORWARD_LAYER_SUPPORT_FUNC(backend, IsResizeSupported, input, output, descriptor);
+}
+
+ARMNN_DEPRECATED_MSG("Use IsResizeSupported instead")
bool IsResizeBilinearSupported(const BackendId& backend,
const TensorInfo& input,
const TensorInfo& output,
char* reasonIfUnsupported,
size_t reasonIfUnsupportedMaxLength)
{
- FORWARD_LAYER_SUPPORT_FUNC(backend, IsResizeBilinearSupported, input, output);
+ ResizeDescriptor descriptor;
+ descriptor.m_Method = ResizeMethod::Bilinear;
+
+ const TensorShape& outputShape = output.GetShape();
+ descriptor.m_TargetWidth = outputShape[3];
+ descriptor.m_TargetHeight = outputShape[2];
+
+ FORWARD_LAYER_SUPPORT_FUNC(backend, IsResizeSupported, input, output, descriptor);
}
bool IsRsqrtSupported(const BackendId& backend,
diff --git a/src/armnn/LayersFwd.hpp b/src/armnn/LayersFwd.hpp
index 2e049ecbda..0f9633a58c 100644
--- a/src/armnn/LayersFwd.hpp
+++ b/src/armnn/LayersFwd.hpp
@@ -44,7 +44,6 @@
#include "layers/PreluLayer.hpp"
#include "layers/QuantizeLayer.hpp"
#include "layers/ReshapeLayer.hpp"
-#include "layers/ResizeBilinearLayer.hpp"
#include "layers/ResizeLayer.hpp"
#include "layers/RsqrtLayer.hpp"
#include "layers/SoftmaxLayer.hpp"
@@ -122,7 +121,6 @@ DECLARE_LAYER(Prelu)
DECLARE_LAYER(Quantize)
DECLARE_LAYER(Reshape)
DECLARE_LAYER(Resize)
-DECLARE_LAYER(ResizeBilinear)
DECLARE_LAYER(Rsqrt)
DECLARE_LAYER(Softmax)
DECLARE_LAYER(SpaceToBatchNd)
diff --git a/src/armnn/Network.cpp b/src/armnn/Network.cpp
index 63432da0ff..f9115ea5df 100644
--- a/src/armnn/Network.cpp
+++ b/src/armnn/Network.cpp
@@ -1182,16 +1182,22 @@ IConnectableLayer* Network::AddBatchNormalizationLayer(const BatchNormalizationD
return layer;
}
-IConnectableLayer* Network::AddResizeBilinearLayer(const ResizeBilinearDescriptor&
-resizeDescriptor, const char* name)
+IConnectableLayer* Network::AddResizeBilinearLayer(const ResizeBilinearDescriptor& descriptor,
+ const char* name)
{
- return m_Graph->AddLayer<ResizeBilinearLayer>(resizeDescriptor,name);
+ ResizeDescriptor resizeDescriptor;
+ resizeDescriptor.m_Method = ResizeMethod::Bilinear;
+ resizeDescriptor.m_DataLayout = descriptor.m_DataLayout;
+ resizeDescriptor.m_TargetWidth = descriptor.m_TargetWidth;
+ resizeDescriptor.m_TargetHeight = descriptor.m_TargetHeight;
+
+ return m_Graph->AddLayer<ResizeLayer>(resizeDescriptor, name);
}
IConnectableLayer* Network::AddResizeLayer(const ResizeDescriptor&
resizeDescriptor, const char* name)
{
- return m_Graph->AddLayer<ResizeLayer>(resizeDescriptor,name);
+ return m_Graph->AddLayer<ResizeLayer>(resizeDescriptor, name);
}
IConnectableLayer* Network::AddL2NormalizationLayer(const L2NormalizationDescriptor& desc,
diff --git a/src/armnn/Network.hpp b/src/armnn/Network.hpp
index f0dfb1dd07..7fc5b651d0 100644
--- a/src/armnn/Network.hpp
+++ b/src/armnn/Network.hpp
@@ -134,6 +134,7 @@ public:
const ConstTensor& gamma,
const char* name = nullptr) override;
+ ARMNN_DEPRECATED_MSG("Use AddResizeLayer instead")
IConnectableLayer* AddResizeBilinearLayer(const ResizeBilinearDescriptor& resizeDesc,
const char* name = nullptr) override;
diff --git a/src/armnn/QuantizerVisitor.cpp b/src/armnn/QuantizerVisitor.cpp
index f2e0506fd6..37c254102a 100644
--- a/src/armnn/QuantizerVisitor.cpp
+++ b/src/armnn/QuantizerVisitor.cpp
@@ -377,12 +377,16 @@ void QuantizerVisitor::VisitReshapeLayer(const IConnectableLayer* layer,
}
void QuantizerVisitor::VisitResizeBilinearLayer(const IConnectableLayer* layer,
- const ResizeBilinearDescriptor& resizeDesc,
+ const ResizeBilinearDescriptor& resizeBilinearDescriptor,
const char* name)
{
- IConnectableLayer* newLayer = m_QuantizedNetwork->AddResizeBilinearLayer(resizeDesc, name);
- RecordLayer(layer, newLayer);
- SetQuantizedInputConnections(layer, newLayer);
+ ResizeDescriptor resizeDescriptor;
+ resizeDescriptor.m_Method = ResizeMethod::Bilinear;
+ resizeDescriptor.m_TargetWidth = resizeBilinearDescriptor.m_TargetWidth;
+ resizeDescriptor.m_TargetHeight = resizeBilinearDescriptor.m_TargetHeight;
+ resizeDescriptor.m_DataLayout = resizeBilinearDescriptor.m_DataLayout;
+
+ VisitResizeLayer(layer, resizeDescriptor, name);
}
void QuantizerVisitor::VisitResizeLayer(const IConnectableLayer* layer,
diff --git a/src/armnn/QuantizerVisitor.hpp b/src/armnn/QuantizerVisitor.hpp
index 26158c3fbd..688eea6b3d 100644
--- a/src/armnn/QuantizerVisitor.hpp
+++ b/src/armnn/QuantizerVisitor.hpp
@@ -110,14 +110,15 @@ public:
const ReshapeDescriptor& reshapeDescriptor,
const char* name = nullptr) override;
- void VisitResizeBilinearLayer(const IConnectableLayer* layer,
- const ResizeBilinearDescriptor& resizeDesc,
- const char* name = nullptr) override;
-
void VisitResizeLayer(const IConnectableLayer* layer,
const ResizeDescriptor& resizeDescriptor,
const char* name = nullptr) override;
+ ARMNN_DEPRECATED_MSG("Use VisitResizeLayer instead")
+ void VisitResizeBilinearLayer(const IConnectableLayer* layer,
+ const ResizeBilinearDescriptor& resizeDesc,
+ const char* name = nullptr) override;
+
void VisitRsqrtLayer(const IConnectableLayer*,
const char* name = nullptr) override;
diff --git a/src/armnn/layers/ResizeBilinearLayer.cpp b/src/armnn/layers/ResizeBilinearLayer.cpp
deleted file mode 100644
index 03fe317e79..0000000000
--- a/src/armnn/layers/ResizeBilinearLayer.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-//
-// Copyright © 2017 Arm Ltd. All rights reserved.
-// SPDX-License-Identifier: MIT
-//
-#include "ResizeBilinearLayer.hpp"
-
-#include "LayerCloneBase.hpp"
-
-#include <armnn/TypesUtils.hpp>
-
-#include <backendsCommon/WorkloadData.hpp>
-#include <backendsCommon/WorkloadFactory.hpp>
-
-#include <DataLayoutIndexed.hpp>
-
-using namespace armnnUtils;
-
-namespace armnn
-{
-
-ResizeBilinearLayer::ResizeBilinearLayer(const ResizeBilinearDescriptor& param, const char* name)
- : LayerWithParameters(1, 1, LayerType::ResizeBilinear, param, name)
-{
-}
-
-std::unique_ptr<IWorkload> ResizeBilinearLayer::CreateWorkload(const Graph& graph,
- const IWorkloadFactory& factory) const
-{
- ResizeBilinearQueueDescriptor descriptor;
- return factory.CreateResizeBilinear(descriptor, PrepInfoAndDesc(descriptor, graph));
-}
-
-ResizeBilinearLayer* ResizeBilinearLayer::Clone(Graph& graph) const
-{
- return CloneBase<ResizeBilinearLayer>(graph, m_Param, GetName());
-}
-
-std::vector<TensorShape> ResizeBilinearLayer::InferOutputShapes(const std::vector<TensorShape>& inputShapes) const
-{
- BOOST_ASSERT(inputShapes.size() == 1);
- const TensorShape& inputShape = inputShapes[0];
- const DataLayoutIndexed dimensionIndices = m_Param.m_DataLayout;
- unsigned int outWidth = m_Param.m_TargetWidth;
- unsigned int outHeight = m_Param.m_TargetHeight;
- unsigned int outChannels = inputShape[dimensionIndices.GetChannelsIndex()];
- unsigned int outBatch = inputShape[0];
-
- TensorShape tensorShape = m_Param.m_DataLayout == armnn::DataLayout::NHWC ?
- TensorShape( { outBatch, outHeight, outWidth, outChannels } ) :
- TensorShape( { outBatch, outChannels, outHeight, outWidth });
-
- return std::vector<TensorShape>({ tensorShape });
-}
-
-void ResizeBilinearLayer::ValidateTensorShapesFromInputs()
-{
- VerifyLayerConnections(1, CHECK_LOCATION());
-
- auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
-
- BOOST_ASSERT(inferredShapes.size() == 1);
-
- ConditionalThrowIfNotEqual<LayerValidationException>(
- "ResizeBilinearLayer: TensorShape set on OutputSlot[0] does not match the inferred shape.",
- GetOutputSlot(0).GetTensorInfo().GetShape(),
- inferredShapes[0]);
-}
-
-void ResizeBilinearLayer::Accept(ILayerVisitor& visitor) const
-{
- visitor.VisitResizeBilinearLayer(this, GetParameters(), GetName());
-}
-
-} // namespace armnn
diff --git a/src/armnn/layers/ResizeBilinearLayer.hpp b/src/armnn/layers/ResizeBilinearLayer.hpp
deleted file mode 100644
index 4bf264cb45..0000000000
--- a/src/armnn/layers/ResizeBilinearLayer.hpp
+++ /dev/null
@@ -1,49 +0,0 @@
-//
-// Copyright © 2017 Arm Ltd. All rights reserved.
-// SPDX-License-Identifier: MIT
-//
-#pragma once
-
-#include "LayerWithParameters.hpp"
-
-namespace armnn
-{
-
-/// This layer represents a resize bilinear operation.
-class ResizeBilinearLayer : public LayerWithParameters<ResizeBilinearDescriptor>
-{
-public:
- /// Makes a workload for the ResizeBilinear type.
- /// @param [in] graph The graph where this layer can be found.
- /// @param [in] factory The workload factory which will create the workload.
- /// @return A pointer to the created workload, or nullptr if not created.
- virtual std::unique_ptr<IWorkload>CreateWorkload(const Graph& graph,
- const IWorkloadFactory& factory) const override;
-
- /// Creates a dynamically-allocated copy of this layer.
- /// @param [in] graph The graph into which this layer is being cloned.
- ResizeBilinearLayer* Clone(Graph& graph) const override;
-
- /// Check if the input tensor shape(s)
- /// will lead to a valid configuration of @ref ResizeBilinearLayer.
- void ValidateTensorShapesFromInputs() override;
-
- /// By default returns inputShapes if the number of inputs are equal to number of outputs,
- /// otherwise infers the output shapes from given input shapes and layer properties.
- /// @param [in] inputShapes The input shapes layer has.
- /// @return A vector to the inferred output shape.
- std::vector<TensorShape> InferOutputShapes(const std::vector<TensorShape>& inputShapes) const override;
-
- void Accept(ILayerVisitor& visitor) const override;
-
-protected:
- /// Constructor to create a ResizeBilinearLayerLayer.
- /// @param [in] param ResizeBilinearDescriptor to configure the resize bilinear operation.
- /// @param [in] name Optional name for the layer.
- ResizeBilinearLayer(const ResizeBilinearDescriptor& param, const char* name);
-
- /// Default destructor
- ~ResizeBilinearLayer() = default;
-};
-
-} // namespace
diff --git a/src/armnn/test/CreateWorkload.hpp b/src/armnn/test/CreateWorkload.hpp
index 0048646d45..774df6a4bb 100644
--- a/src/armnn/test/CreateWorkload.hpp
+++ b/src/armnn/test/CreateWorkload.hpp
@@ -836,10 +836,10 @@ void CreateSplitterMultipleInputsOneOutputWorkloadTest(armnn::IWorkloadFactory&
wlActiv1_1 = std::move(workloadActiv1_1);
}
-template <typename ResizeBilinearWorkload, armnn::DataType DataType>
-std::unique_ptr<ResizeBilinearWorkload> CreateResizeBilinearWorkloadTest(armnn::IWorkloadFactory& factory,
- armnn::Graph& graph,
- DataLayout dataLayout = DataLayout::NCHW)
+template <typename ResizeWorkload, armnn::DataType DataType>
+std::unique_ptr<ResizeWorkload> CreateResizeBilinearWorkloadTest(armnn::IWorkloadFactory& factory,
+ armnn::Graph& graph,
+ DataLayout dataLayout = DataLayout::NCHW)
{
TensorShape inputShape;
TensorShape outputShape;
@@ -856,15 +856,16 @@ std::unique_ptr<ResizeBilinearWorkload> CreateResizeBilinearWorkloadTest(armnn::
}
// Creates the layer we're testing.
- ResizeBilinearDescriptor resizeDesc;
+ ResizeDescriptor resizeDesc;
armnnUtils::DataLayoutIndexed dimensionIndices = dataLayout;
- resizeDesc.m_TargetWidth = outputShape[dimensionIndices.GetWidthIndex()];
+ resizeDesc.m_Method = ResizeMethod::Bilinear;
+ resizeDesc.m_TargetWidth = outputShape[dimensionIndices.GetWidthIndex()];
resizeDesc.m_TargetHeight = outputShape[dimensionIndices.GetHeightIndex()];
- resizeDesc.m_DataLayout = dataLayout;
- Layer* const layer = graph.AddLayer<ResizeBilinearLayer>(resizeDesc, "layer");
+ resizeDesc.m_DataLayout = dataLayout;
+ Layer* const layer = graph.AddLayer<ResizeLayer>(resizeDesc, "resize");
// Creates extra layers.
- Layer* const input = graph.AddLayer<InputLayer>(0, "input");
+ Layer* const input = graph.AddLayer<InputLayer>(0, "input");
Layer* const output = graph.AddLayer<OutputLayer>(0, "output");
// Connects up.
@@ -875,12 +876,12 @@ std::unique_ptr<ResizeBilinearWorkload> CreateResizeBilinearWorkloadTest(armnn::
CreateTensorHandles(graph, factory);
// Makes the workload and checks it.
- auto workload = MakeAndCheckWorkload<ResizeBilinearWorkload>(*layer, graph, factory);
+ auto workload = MakeAndCheckWorkload<ResizeWorkload>(*layer, graph, factory);
- ResizeBilinearQueueDescriptor queueDescriptor = workload->GetData();
- BOOST_TEST(queueDescriptor.m_Inputs.size() == 1);
- BOOST_TEST(queueDescriptor.m_Outputs.size() == 1);
- BOOST_TEST((queueDescriptor.m_Parameters.m_DataLayout == dataLayout));
+ auto queueDescriptor = workload->GetData();
+ BOOST_CHECK(queueDescriptor.m_Inputs.size() == 1);
+ BOOST_CHECK(queueDescriptor.m_Outputs.size() == 1);
+ BOOST_CHECK(queueDescriptor.m_Parameters.m_DataLayout == dataLayout);
// Returns so we can do extra, backend-specific tests.
return workload;
diff --git a/src/armnn/test/OptimizerTests.cpp b/src/armnn/test/OptimizerTests.cpp
index 97bd8de651..b06403c8d6 100644
--- a/src/armnn/test/OptimizerTests.cpp
+++ b/src/armnn/test/OptimizerTests.cpp
@@ -953,18 +953,19 @@ BOOST_AUTO_TEST_CASE(Pooling2dValidateTensorShapesFromInputsNhwc)
void CreateResizeBilinearGraph(Graph &graph, const unsigned int* inputShape, const unsigned int* outputShape,
DataLayout dataLayout = DataLayout::NCHW)
{
- armnn::TensorInfo inputInfo(4, inputShape, DataType::Float32);
- armnn::TensorInfo outputInfo(4, outputShape, DataType::Float32);
+ TensorInfo inputInfo(4, inputShape, DataType::Float32);
+ TensorInfo outputInfo(4, outputShape, DataType::Float32);
- ResizeBilinearDescriptor desc;
+ ResizeDescriptor desc;
+ desc.m_Method = ResizeMethod::Bilinear;
desc.m_TargetHeight = 3;
- desc.m_TargetWidth = 4;
- desc.m_DataLayout = dataLayout;
+ desc.m_TargetWidth = 4;
+ desc.m_DataLayout = dataLayout;
Layer* input = graph.AddLayer<InputLayer>(0, "input");
input->GetOutputSlot().SetTensorInfo(inputInfo);
- ResizeBilinearLayer* layer = graph.AddLayer<ResizeBilinearLayer>(desc, "resizeBilinear");
+ ResizeLayer* layer = graph.AddLayer<ResizeLayer>(desc, "resizeBilinear");
layer->GetOutputSlot().SetTensorInfo(outputInfo);
Layer* output = graph.AddLayer<OutputLayer>(0, "output");
diff --git a/src/armnn/test/QuantizerTest.cpp b/src/armnn/test/QuantizerTest.cpp
index 57f602dbba..09e71ae4e8 100644
--- a/src/armnn/test/QuantizerTest.cpp
+++ b/src/armnn/test/QuantizerTest.cpp
@@ -1477,52 +1477,6 @@ BOOST_AUTO_TEST_CASE(QuantizeSplitter)
VisitLayersTopologically(quantizedNetworkQSymm16.get(), validatorQSymm16);
}
-BOOST_AUTO_TEST_CASE(QuantizeResizeBilinear)
-{
- class TestResizeBilinearQuantization : public TestLeakyReLuActivationQuantization
- {
- public:
- TestResizeBilinearQuantization(const TensorShape& inputShape, const TensorShape& outputShape)
- : TestLeakyReLuActivationQuantization(inputShape, outputShape) {}
-
- TestResizeBilinearQuantization(const QuantizerOptions& options,
- const TensorShape& inputShape,
- const TensorShape& outputShape)
- : TestLeakyReLuActivationQuantization(options, inputShape, outputShape) {}
-
- void VisitResizeBilinearLayer(const IConnectableLayer* layer,
- const ResizeBilinearDescriptor& resizeDescriptor,
- const char* name = nullptr) override
- {
- CheckForwardedQuantizationSettings(layer);
- }
- };
-
- INetworkPtr network = INetwork::Create();
-
- const TensorShape shape{1U};
- TensorInfo info(shape, DataType::Float32);
-
- IConnectableLayer* activation = CreateStartOfLeakyReluNetwork(network.get(), info);
-
- // Add the layer under test
- ResizeBilinearDescriptor descriptor;
- descriptor.m_TargetHeight = 3;
- descriptor.m_TargetWidth = 3;
- IConnectableLayer* spaceToBatch = network->AddResizeBilinearLayer(descriptor);
-
- CompleteLeakyReluNetwork(network.get(), activation, spaceToBatch, info);
-
- INetworkPtr quantizedNetworkQAsymm8 = INetworkQuantizer::Create(network.get())->ExportNetwork();
- TestResizeBilinearQuantization validatorQAsymm8(shape, shape);
- VisitLayersTopologically(quantizedNetworkQAsymm8.get(), validatorQAsymm8);
-
- const QuantizerOptions options(DataType::QuantisedSymm16);
- INetworkPtr quantizedNetworkQSymm16 = INetworkQuantizer::Create(network.get(), options)->ExportNetwork();
- TestResizeBilinearQuantization validatorQSymm16(options, shape, shape);
- VisitLayersTopologically(quantizedNetworkQSymm16.get(), validatorQSymm16);
-}
-
BOOST_AUTO_TEST_CASE(QuantizeResize)
{
class TestResizeQuantization : public TestLeakyReLuActivationQuantization
@@ -1556,7 +1510,7 @@ BOOST_AUTO_TEST_CASE(QuantizeResize)
// Add the layer under test
ResizeDescriptor descriptor;
descriptor.m_TargetHeight = 3;
- descriptor.m_TargetWidth = 3;
+ descriptor.m_TargetWidth = 3;
IConnectableLayer* resizeLayer = network->AddResizeLayer(descriptor);
CompleteLeakyReluNetwork(network.get(), activation, resizeLayer, info);
diff --git a/src/armnn/test/TestNameAndDescriptorLayerVisitor.cpp b/src/armnn/test/TestNameAndDescriptorLayerVisitor.cpp
index 478f0293a4..b841e72060 100644
--- a/src/armnn/test/TestNameAndDescriptorLayerVisitor.cpp
+++ b/src/armnn/test/TestNameAndDescriptorLayerVisitor.cpp
@@ -255,30 +255,30 @@ BOOST_AUTO_TEST_CASE(CheckConcatLayerVisitorNameNullAndDescriptor)
layer->Accept(visitor);
}
-BOOST_AUTO_TEST_CASE(CheckResizeBilinearLayerVisitorNameAndDescriptor)
+BOOST_AUTO_TEST_CASE(CheckResizeLayerVisitorNameAndDescriptor)
{
- const char* layerName = "ResizeBilinearLayer";
- ResizeBilinearDescriptor descriptor;
+ const char* layerName = "ResizeLayer";
+ ResizeDescriptor descriptor;
descriptor.m_TargetHeight = 1;
descriptor.m_TargetWidth = 1;
descriptor.m_DataLayout = DataLayout::NHWC;
- TestResizeBilinearLayerVisitor visitor(descriptor, layerName);
+ TestResizeLayerVisitor visitor(descriptor, layerName);
Network net;
- IConnectableLayer *const layer = net.AddResizeBilinearLayer(descriptor, layerName);
+ IConnectableLayer *const layer = net.AddResizeLayer(descriptor, layerName);
layer->Accept(visitor);
}
-BOOST_AUTO_TEST_CASE(CheckResizeBilinearLayerVisitorNameNullAndDescriptor)
+BOOST_AUTO_TEST_CASE(CheckResizeLayerVisitorNameNullAndDescriptor)
{
- ResizeBilinearDescriptor descriptor;
+ ResizeDescriptor descriptor;
descriptor.m_TargetHeight = 1;
descriptor.m_TargetWidth = 1;
descriptor.m_DataLayout = DataLayout::NHWC;
- TestResizeBilinearLayerVisitor visitor(descriptor);
+ TestResizeLayerVisitor visitor(descriptor);
Network net;
- IConnectableLayer *const layer = net.AddResizeBilinearLayer(descriptor);
+ IConnectableLayer *const layer = net.AddResizeLayer(descriptor);
layer->Accept(visitor);
}
diff --git a/src/armnn/test/TestNameAndDescriptorLayerVisitor.hpp b/src/armnn/test/TestNameAndDescriptorLayerVisitor.hpp
index 0db956d36d..f1936d6847 100644
--- a/src/armnn/test/TestNameAndDescriptorLayerVisitor.hpp
+++ b/src/armnn/test/TestNameAndDescriptorLayerVisitor.hpp
@@ -385,33 +385,35 @@ public:
};
};
-class TestResizeBilinearLayerVisitor : public TestLayerVisitor
+class TestResizeLayerVisitor : public TestLayerVisitor
{
private:
- ResizeBilinearDescriptor m_VisitorDescriptor;
+ ResizeDescriptor m_VisitorDescriptor;
public:
- explicit TestResizeBilinearLayerVisitor(const ResizeBilinearDescriptor& resizeDesc, const char* name = nullptr)
+ explicit TestResizeLayerVisitor(const ResizeDescriptor& descriptor, const char* name = nullptr)
: TestLayerVisitor(name)
{
- m_VisitorDescriptor.m_TargetWidth = resizeDesc.m_TargetWidth;
- m_VisitorDescriptor.m_TargetHeight = resizeDesc.m_TargetHeight;
- m_VisitorDescriptor.m_DataLayout = resizeDesc.m_DataLayout;
+ m_VisitorDescriptor.m_Method = descriptor.m_Method;
+ m_VisitorDescriptor.m_TargetWidth = descriptor.m_TargetWidth;
+ m_VisitorDescriptor.m_TargetHeight = descriptor.m_TargetHeight;
+ m_VisitorDescriptor.m_DataLayout = descriptor.m_DataLayout;
};
- void CheckDescriptor(const ResizeBilinearDescriptor& resizeDesc)
+ void CheckDescriptor(const ResizeDescriptor& descriptor)
{
- BOOST_CHECK_EQUAL(resizeDesc.m_TargetWidth, m_VisitorDescriptor.m_TargetWidth);
- BOOST_CHECK_EQUAL(resizeDesc.m_TargetHeight, m_VisitorDescriptor.m_TargetHeight);
- BOOST_CHECK(resizeDesc.m_DataLayout == m_VisitorDescriptor.m_DataLayout);
+ BOOST_CHECK(descriptor.m_Method == m_VisitorDescriptor.m_Method);
+ BOOST_CHECK(descriptor.m_TargetWidth == m_VisitorDescriptor.m_TargetWidth);
+ BOOST_CHECK(descriptor.m_TargetHeight == m_VisitorDescriptor.m_TargetHeight);
+ BOOST_CHECK(descriptor.m_DataLayout == m_VisitorDescriptor.m_DataLayout);
}
- void VisitResizeBilinearLayer(const IConnectableLayer* layer,
- const ResizeBilinearDescriptor& resizeDesc,
- const char* name = nullptr) override
+ void VisitResizeLayer(const IConnectableLayer* layer,
+ const ResizeDescriptor& descriptor,
+ const char* name = nullptr) override
{
CheckLayerPointer(layer);
- CheckDescriptor(resizeDesc);
+ CheckDescriptor(descriptor);
CheckLayerName(name);
};
};