14 #include <boost/test/unit_test.hpp> 37 ClWorkloadFactoryHelper::GetFactory(ClWorkloadFactoryHelper::GetMemoryManager());
38 for (
auto&& layer : static_cast<armnn::OptimizedNetwork*>(optNet.get())->GetGraph())
42 layer->CreateWorkload(fact));
65 activation1Descriptor.
m_A = 1.f;
66 activation1Descriptor.
m_B = -1.f;
72 activation->GetOutputSlot(0).Connect(output->GetInputSlot(0));
76 input->GetOutputSlot(0).SetTensorInfo(info);
77 activation->GetOutputSlot(0).SetTensorInfo(info);
88 net, backends, runtime->GetDeviceSpec(), optimizerOptions);
93 BOOST_TEST(graph.GetNumLayers() == 5);
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
static IRuntimePtr Create(const CreationOptions &options)
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
IConnectableLayer * AddOutputLayer(LayerBindingId id, const char *name=nullptr) override
Adds an output layer to the network.
std::unique_ptr< IRuntime, void(*)(IRuntime *runtime)> IRuntimePtr
bool GraphHasNamedLayer(const armnn::Graph &graph, const std::string &name)
IConnectableLayer * AddInputLayer(LayerBindingId id, const char *name=nullptr) override
Adds an input layer to the network.
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
IOptimizedNetworkPtr Optimize(const INetwork &network, const std::vector< BackendId > &backendPreferences, const IDeviceSpec &deviceSpec, const OptimizerOptions &options=OptimizerOptions(), Optional< std::vector< std::string > &> messages=EmptyOptional())
Create an optimized version of the network.
std::unique_ptr< IOptimizedNetwork, void(*)(IOptimizedNetwork *network)> IOptimizedNetworkPtr
IConnectableLayer * AddActivationLayer(const ActivationDescriptor &activationDescriptor, const char *name=nullptr) override
Adds an activation layer to the network.
GPU Execution: OpenCL: ArmCompute.
An ActivationDescriptor for the ActivationLayer.
min(a, max(b, input)) ReLu1 & ReLu6.
Private implementation of INetwork.
float m_A
Alpha upper bound value used by the activation functions. (BoundedReLu, Linear, TanH).
BOOST_AUTO_TEST_SUITE_END()
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
virtual int Connect(IInputSlot &destination)=0
armnn::Runtime::CreationOptions::ExternalProfilingOptions options
float m_B
Beta lower bound value used by the activation functions. (BoundedReLu, Linear, TanH).
static INetworkPtr Create()
ActivationFunction m_Function
The activation function to use (Sigmoid, TanH, Linear, ReLu, BoundedReLu, SoftReLu, LeakyReLu, Abs, Sqrt, Square).
BOOST_AUTO_TEST_CASE(OptimizeValidateGpuDeviceSupportLayerNoFallback)