11 #include <arm_compute/runtime/NEON/functions/NESoftmaxLayer.h> 18 std::shared_ptr<arm_compute::MemoryManagerOnDemand>& memoryManager)
23 arm_compute::ITensor& input = boost::polymorphic_downcast<IAclTensorHandle*>(
m_Data.
m_Inputs[0])->GetTensor();
24 arm_compute::ITensor& output = boost::polymorphic_downcast<IAclTensorHandle*>(
m_Data.
m_Outputs[0])->GetTensor();
26 const auto outputQuantization = output.info()->quantization_info();
28 if ((!outputQuantization.scale().empty() && outputQuantization.scale()[0] != (1.0f / 256.0f)) ||
29 (!outputQuantization.offset().empty() && outputQuantization.offset()[0] != 0) ||
30 outputQuantization.scale().empty() || outputQuantization.offset().empty())
33 "Invalid quantization for output. Only scale = 1.0f / 256.0f and offset = 0 supported");
36 auto layer = std::make_unique<arm_compute::NESoftmaxLayer>(memoryManager);
39 m_SoftmaxLayer.reset(layer.release());
46 m_SoftmaxLayer->run();
const QueueDescriptor m_Data
#define ARMNN_SCOPED_PROFILING_EVENT_NEON(name)
float m_Beta
Exponentiation value.
void ValidateInputsOutputs(const std::string &descName, unsigned int numExpectedIn, unsigned int numExpectedOut) const
Copyright (c) 2020 ARM Limited.
LayerDescriptor m_Parameters
std::vector< TensorInfo > m_InputTensorInfos
NeonSoftmaxUint8Workload(const SoftmaxQueueDescriptor &descriptor, const WorkloadInfo &info, std::shared_ptr< arm_compute::MemoryManagerOnDemand > &memoryManager)
virtual void Execute() const override
unsigned int ComputeSoftmaxAclAxis(const SoftmaxDescriptor &softmaxDesc, const armnn::TensorInfo &tensor)
std::vector< ITensorHandle * > m_Outputs
Contains information about inputs and outputs to a layer.
std::vector< ITensorHandle * > m_Inputs