diff --git a/src/operators/kernel/fpga/V1/sigmoid_kernel.cpp b/src/operators/kernel/fpga/V1/sigmoid_kernel.cpp index bb9eb3d6e8acf3d59ce3c4541f8c553fe7cb1cc2..8fa6feda7f338baf29c8f5e2d484f2e0114242a7 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;