14 #include <arm_compute/runtime/NEON/functions/NESoftmaxLayer.h> 23 const arm_compute::TensorInfo aclInputInfo = armcomputetensorutils::BuildArmComputeTensorInfo(input);
24 const arm_compute::TensorInfo aclOutputInfo = armcomputetensorutils::BuildArmComputeTensorInfo(output);
27 return arm_compute::NELogSoftmaxLayer::validate(&aclInputInfo,
35 std::shared_ptr<arm_compute::MemoryManagerOnDemand>& memoryManager)
46 arm_compute::ITensor& input = PolymorphicDowncast<IAclTensorHandle*>(
m_Data.
m_Inputs[0])->GetTensor();
47 arm_compute::ITensor& output = PolymorphicDowncast<IAclTensorHandle*>(
m_Data.
m_Outputs[0])->GetTensor();
49 auto layer = std::make_unique<arm_compute::NELogSoftmaxLayer>(memoryManager);
52 m_LogSoftmaxLayer.reset(layer.release());
58 m_LogSoftmaxLayer->run();
int ComputeAclAxis(const int &armnnAxis, const armnn::TensorInfo &tensor)
Function to convert ArmNN axis (left to right) to ACL axis (right to left) ranging from [-rank...
int m_Axis
Scalar, defaulted to the last index (-1), specifying the dimension the activation will be performed o...
NeonLogSoftmaxWorkload(const LogSoftmaxQueueDescriptor &descriptor, const WorkloadInfo &info, std::shared_ptr< arm_compute::MemoryManagerOnDemand > &memoryManager)
arm_compute::Status NeonLogSoftmaxWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const LogSoftmaxDescriptor &descriptor)
float m_Beta
Exponentiation value.
void ValidateInputsOutputs(const std::string &descName, unsigned int numExpectedIn, unsigned int numExpectedOut) const
Copyright (c) 2021 ARM Limited and Contributors.
LayerDescriptor m_Parameters
std::vector< TensorInfo > m_InputTensorInfos
LogSoftmaxQueueDescriptor m_Data
virtual void Execute() const override
profiling::ProfilingGuid GetGuid() const final
std::vector< ITensorHandle * > m_Outputs
#define ARMNN_REPORT_PROFILING_WORKLOAD_DESC(name, desc, infos, guid)
Contains information about TensorInfos of a layer.
std::vector< ITensorHandle * > m_Inputs
#define ARMNN_SCOPED_PROFILING_EVENT_NEON_GUID(name, guid)
A SoftmaxDescriptor for the SoftmaxLayer.