31 namespace experimental
35 auto k = std::make_unique<cpu::kernels::CpuArithmeticKernel>();
37 _kernel = std::move(k);
46 struct NEPReluLayer::Impl
48 const ITensor *src_0{
nullptr };
49 const ITensor *src_1{
nullptr };
51 std::unique_ptr<experimental::NEPRelu> op{
nullptr };
55 : _impl(
std::make_unique<Impl>())
67 _impl->op = std::make_unique<experimental::NEPRelu>();
68 _impl->op->configure(input->
info(), alpha->
info(), output->
info());
void configure(const ITensor *input, const ITensor *alpha, ITensor *output)
Set the input and output tensor.
void configure(const ITensorInfo *input, const ITensorInfo *alpha, ITensorInfo *output)
Set the input and output tensor.
Store the tensor's metadata.
Interface for Neon tensor.
Copyright (c) 2017-2021 Arm Limited.
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor's metadata.
y*x if x < 0, x otherwise
Basic function to run cpu::kernels::CpuArithmeticKernel for PRELU.
static Status validate(ArithmeticOperation op, const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *output)
Static function to check if given info will lead to a valid configuration of cpu::kernels::CpuArithme...
~NEPReluLayer()
Default Destructor.
void run() override
Run the kernels contained in the function.
static Status validate(const ITensorInfo *input, const ITensorInfo *alpha, const ITensorInfo *output)
Static function to check if given info will lead to a valid configuration of cpu::kernels::CpuCompari...
NEPReluLayer & operator=(const NEPReluLayer &)=delete
Prevent instances of this class from being copied (As this class contains pointers) ...
NEPReluLayer()
Default Constructor.
void add_tensor(int id, ITensor *tensor)
Add tensor to the pack.
static Status validate(const ITensorInfo *input, const ITensorInfo *alpha, const ITensorInfo *output)
Static function to check if given info will lead to a valid configuration of NEPReluLayer.