From 886c997b25822706bfd01ac95cfc146490c8b138 Mon Sep 17 00:00:00 2001 From: qnqinan Date: Wed, 20 Mar 2019 18:18:56 +0800 Subject: [PATCH] fix a bug in sigmoid kernel in FPGA track --- src/operators/kernel/fpga/V1/sigmoid_kernel.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/operators/kernel/fpga/V1/sigmoid_kernel.cpp b/src/operators/kernel/fpga/V1/sigmoid_kernel.cpp index bb9eb3d6e8..8fa6feda7f 100644 --- a/src/operators/kernel/fpga/V1/sigmoid_kernel.cpp +++ b/src/operators/kernel/fpga/V1/sigmoid_kernel.cpp @@ -33,11 +33,9 @@ bool SigmoidKernel::Init(SigmoidParam *param) { args.input_data_type = fpga::DATA_TYPE_FP16; args.output_data_type = fpga::DATA_TYPE_FP16; args.image.address = input_ptr; - args.image.height = - (input->dims().size() == 4) ? (uint32_t)input->dims()[2] : 1; - args.image.width = - (input->dims().size() == 4) ? (uint32_t)input->dims()[3] : 1; - args.image.channels = (uint32_t)input->dims()[1]; + args.image.height = 1; + args.image.width = 1; + args.image.channels = input->fpga_data_num; args.output.address = out->data(); args.output.scale_address = out->scale; args.output.activation.activation_type = activation_enable; -- GitLab