private:
void appendReLU(::arm_compute::ICLTensor *tensor);
+ void appendReLU6(::arm_compute::ICLTensor *tensor);
public:
void append(FuseCode code, ::arm_compute::ICLTensor *tensor);
_builder.append(std::move(fn));
}
+void ActivationBuilder::appendReLU6(::arm_compute::ICLTensor *ifm_alloc)
+{
+ const ::arm_compute::ActivationLayerInfo act_info{
+ ::arm_compute::ActivationLayerInfo::ActivationFunction::LU_BOUNDED_RELU, 6.0f, 0.0f};
+
+ auto fn = make_layer<::arm_compute::CLActivationLayer>();
+
+ fn->configure(ifm_alloc, nullptr, act_info);
+
+ _builder.append(std::move(fn));
+}
+
void ActivationBuilder::append(FuseCode code, ::arm_compute::ICLTensor *ifm_alloc)
{
switch (code)
appendReLU(ifm_alloc);
break;
}
+ case ANEURALNETWORKS_FUSED_RELU6:
+ {
+ appendReLU6(ifm_alloc);
+ break;
+ }
default:
{
throw std::runtime_error("Not supported, yet");