未验证 提交 995c0e9d 编写于 作者: H huzhiqiang 提交者: GitHub

[FC] Fix Fc arm kernel #4111

上级 5dcd5637
......@@ -50,7 +50,7 @@ bool FcOpLite::CheckShape() const {
bool FcOpLite::InferShapeImpl() const {
const auto& input_dims = param_.input->dims();
const auto& w_dims = param_.w->dims();
const auto& w_dims = param_.w_dims;
int in_num_col_dims = param_.in_num_col_dims;
int64_t w_dims_1 = param_.padding_weights ? w_dims[1] - 4 : w_dims[1];
......@@ -77,6 +77,7 @@ bool FcOpLite::AttachImpl(const cpp::OpDesc& op_desc, lite::Scope* scope) {
param_.input = scope->FindVar(input)->GetMutable<lite::Tensor>();
param_.w = scope->FindVar(W)->GetMutable<lite::Tensor>();
param_.w_dims = param_.w->dims();
std::vector<std::string> input_arg_names = op_desc.InputArgumentNames();
if (std::find(input_arg_names.begin(), input_arg_names.end(), "Bias") !=
input_arg_names.end()) {
......
......@@ -103,6 +103,8 @@ struct FcParam : ParamBase {
lite::Tensor* bias{nullptr};
lite::Tensor* output{nullptr};
lite::DDim in_mat_dims;
// original dims of input weight
lite::DDim w_dims;
int in_num_col_dims{1};
std::string activation_type{""};
bool padding_weights{false};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册