6 #include "../TestUtils.hpp" 10 #include <boost/test/unit_test.hpp> 32 floor->GetOutputSlot().Connect(output->GetInputSlot(0));
35 &IsLayerOfType<armnn::FloorLayer>, &IsLayerOfType<armnn::OutputLayer>));
41 &IsLayerOfType<armnn::FloorLayer>,
42 &IsLayerOfType<armnn::OutputLayer>));
52 unsigned int dims[] = { 4, 2, 1, 1 };
53 std::vector<float> floatWeights{ 0.0f, -1.0f,
64 unsigned int biasDims[] {4};
65 std::vector<float> floatBias{ 1.0f, 2.0f, 3.0f, 4.0f };
75 conv->
m_Weight = std::make_unique<armnn::ScopedTensorHandle>(weights);
76 conv->m_Bias = std::make_unique<armnn::ScopedTensorHandle>(bias);
77 conv->GetOutputSlot().SetTensorInfo(infoFP32);
83 conv->GetOutputSlot().Connect(output->GetInputSlot(0));
86 &IsLayerOfType<armnn::Convolution2dLayer>, &IsLayerOfType<armnn::OutputLayer>));
92 &IsLayerOfType<armnn::ConvertFp32ToBf16Layer>, &IsLayerOfType<armnn::Convolution2dLayer>,
93 &IsLayerOfType<armnn::OutputLayer>));
95 armnn::TensorInfo inputTensor = conv->GetInputSlot(0).GetConnectedOutputSlot()->GetTensorInfo();
122 unsigned int dims[] = { 4, 2, 1, 1 };
123 std::vector<float> floatWeights{ 0.0f, -1.0f,
134 unsigned int biasDims[] {4};
135 std::vector<float> floatBias{ 1.0f, 2.0f, 3.0f, 4.0f };
145 fc->
m_Weight = std::make_unique<armnn::ScopedTensorHandle>(weights);
146 fc->m_Bias = std::make_unique<armnn::ScopedTensorHandle>(bias);
147 fc->GetOutputSlot().SetTensorInfo(infoFP32);
153 fc->GetOutputSlot().Connect(output->GetInputSlot(0));
156 &IsLayerOfType<armnn::FullyConnectedLayer>, &IsLayerOfType<armnn::OutputLayer>));
162 &IsLayerOfType<armnn::ConvertFp32ToBf16Layer>, &IsLayerOfType<armnn::FullyConnectedLayer>,
163 &IsLayerOfType<armnn::OutputLayer>));
165 armnn::TensorInfo inputTensor = fc->GetInputSlot(0).GetConnectedOutputSlot()->GetTensorInfo();
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
Optimizer::Optimizations MakeOptimizations(Args &&... args)
LayerT * AddLayer(Args &&... args)
Adds a new layer, of type LayerType, to the graph constructed with the arguments passed.
ConstIterator cbegin() const
Returns const iterator pointing to the beginning of the list. Lowercase for range-based for loops...
A Convolution2dDescriptor for the Convolution2dLayer.
int Connect(InputSlot &destination)
static void Pass(Graph &graph, const Optimizations &optimizations)
std::shared_ptr< ConstTensorHandle > m_Weight
A unique pointer to store Weight values.
A layer user-provided data can be bound to (e.g. inputs, outputs).
This layer represents a fully connected operation.
std::shared_ptr< ConstTensorHandle > m_Weight
A unique pointer to store Weight values.
DataType GetDataType() const
A FullyConnectedDescriptor for the FullyConnectedLayer.
A tensor defined by a TensorInfo (shape and data type) and an immutable backing store.
BOOST_AUTO_TEST_CASE(CheckConvolution2dLayer)
This layer represents a floor operation.
BOOST_AUTO_TEST_SUITE_END()
bool CheckSequence(const armnn::Graph::ConstIterator first, const armnn::Graph::ConstIterator last)
void SetTensorInfo(const TensorInfo &tensorInfo) override
const OutputSlot & GetOutputSlot(unsigned int index=0) const override
Get the const output slot handle by slot index.
ConstIterator cend() const
Returns const iterator pointing to the end of the list. Lowercase for range-based for loops...
This layer represents a convolution 2d operation.
OptimizeForType< Layer, ConvertFp32NetworkToBf16Impl > Fp32NetworkToBf16Converter