From 28ec3a574806edadb3ae0c203764f2c21fb17a71 Mon Sep 17 00:00:00 2001 From: daquexian Date: Fri, 23 Aug 2019 01:03:06 +0800 Subject: [PATCH] Fix some missing cases for binconv method --- dabnn/layers/BinConv.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dabnn/layers/BinConv.cpp b/dabnn/layers/BinConv.cpp index ccf7ff1..a818903 100644 --- a/dabnn/layers/BinConv.cpp +++ b/dabnn/layers/BinConv.cpp @@ -83,11 +83,13 @@ BinConv::Method BinConv::method() const { return Method::DIRECT_CONV; } else if (gemm_compatible()) { return Method::BGEMM; - } else { + } else if (input_mat->elem_c == 64) { return Method::BCONV_NAIVE; + } else { + return Method::BGEMM_NAIVE; } } else { - if (weight_mat->c == 1) { + if (input_mat->elem_c == 64) { return Method::BCONV_NAIVE; } else { return Method::BGEMM_NAIVE;