11 #include <boost/test/unit_test.hpp> 44 layer = net.AddActivationLayer(acDesc,
"ac");
50 layer = net.AddMultiplicationLayer(
"ml");
58 layer = net.AddSoftmaxLayer(softmaxDescriptor,
"sm");
64 layer = net.AddOutputLayer(0,
"ot");
78 for (
auto&& layer : static_cast<armnn::OptimizedNetwork*>(optNet.get())->GetGraph())
80 BOOST_CHECK_NO_THROW(layer->CreateWorkload(fact));
103 permute->GetOutputSlot(0).Connect(output->
GetInputSlot(0));
111 for (
auto&& layer : static_cast<armnn::OptimizedNetwork*>(optNet.get())->GetGraph())
136 meanLayer->GetOutputSlot(0).Connect(output->
GetInputSlot(0));
144 for (
auto&& layer : static_cast<armnn::OptimizedNetwork*>(optNet.get())->GetGraph())
156 activation1Descriptor.
m_A = 1.f;
157 activation1Descriptor.
m_B = -1.f;
166 activation->GetOutputSlot(0).Connect(output->GetInputSlot(0));
170 input->GetOutputSlot(0).SetTensorInfo(info);
171 activation->GetOutputSlot(0).SetTensorInfo(info);
179 optimizerOptions.
m_Debug =
true;
186 BOOST_TEST(graph.GetNumLayers() == 5);
float m_A
Alpha upper bound value used by the activation functions. (BoundedReLu, Linear, TanH).
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
A NormalizationDescriptor for the NormalizationLayer.
IConnectableLayer * AddInputLayer(LayerBindingId id, const char *name=nullptr) override
IOptimizedNetworkPtr Optimize(const INetwork &network, const std::vector< BackendId > &backendPreferences, const IDeviceSpec &deviceSpec, const OptimizerOptions &options=OptimizerOptions(), Optional< std::vector< std::string > &> messages=EmptyOptional())
An ActivationDescriptor for the ActivationLayer.
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
bool GraphHasNamedLayer(const armnn::Graph &graph, const std::string &name)
IConnectableLayer * AddActivationLayer(const ActivationDescriptor &activationDescriptor, const char *name=nullptr) override
Private implementation of INetwork.
BOOST_AUTO_TEST_CASE(OptimizeValidateCpuRefWorkloads)
float m_B
Beta lower bound value used by the activation functions. (BoundedReLu, Linear, TanH).
static INetworkPtr Create()
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
CPU Execution: Reference C++ kernels.
static IRuntimePtr Create(const CreationOptions &options)
BOOST_AUTO_TEST_SUITE_END()
ActivationFunction m_Function
The activation function to use (Sigmoid, TanH, Linear, ReLu, BoundedReLu, SoftReLu, LeakyReLu, Abs, Sqrt, Square).
A SoftmaxDescriptor for the SoftmaxLayer.
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
std::unique_ptr< IOptimizedNetwork, void(*)(IOptimizedNetwork *network)> IOptimizedNetworkPtr
A PermuteDescriptor for the PermuteLayer.
IConnectableLayer * AddOutputLayer(LayerBindingId id, const char *name=nullptr) override
A MeanDescriptor for the MeanLayer.
virtual int Connect(IInputSlot &destination)=0
armnn::Runtime::CreationOptions::ExternalProfilingOptions options
std::unique_ptr< IRuntime, void(*)(IRuntime *runtime)> IRuntimePtr
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0