enable no bias in FC layout inference (#294)
Signed-off-by: yuenan.li <yuenan.li@verisilicon.com> Co-authored-by: yuenan.li <yuenan.li@verisilicon.com>
This commit is contained in:
parent
6e0ac09c92
commit
fe31a47bf9
|
|
@ -53,19 +53,15 @@ class FullyConnectedLayoutInfer : public OpLayoutInfer {
|
||||||
context_->SetPermuteVector(in, trans_pv);
|
context_->SetPermuteVector(in, trans_pv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uint32_t axis = op_->impl()->node()->nn_param.fcl.axis;
|
|
||||||
uint32_t weight = op_->impl()->node()->nn_param.fcl.weights;
|
|
||||||
|
|
||||||
auto fcl = context_->infer_graph_->CreateOperation<vx::ops::FullyConnected>(
|
auto fcl = op_->Clone(context_->infer_graph_);
|
||||||
axis, weight);
|
|
||||||
auto required_pv =
|
auto required_pv =
|
||||||
MakeShared(op_->impl()->OutputsTensor()[0]->GetShape().size());
|
MakeShared(op_->impl()->OutputsTensor()[0]->GetShape().size());
|
||||||
auto out_infer = CreateOutputsTensor(required_pv);
|
auto out_infer = CreateOutputsTensor(required_pv);
|
||||||
(*fcl)
|
for (auto in : op_->impl()->InputsTensor()) {
|
||||||
.BindInputs({context_->GetMapedTensor(op_->impl()->InputsTensor()[0]),
|
(*fcl).BindInput(context_->GetMapedTensor(in));
|
||||||
context_->GetMapedTensor(op_->impl()->InputsTensor()[1]),
|
}
|
||||||
context_->GetMapedTensor(op_->impl()->InputsTensor()[2])})
|
(*fcl).BindOutput(out_infer[0]);
|
||||||
.BindOutput(out_infer[0]);
|
|
||||||
context_->SetPermuteVector(op_->impl()->OutputsTensor()[0], required_pv);
|
context_->SetPermuteVector(op_->impl()->OutputsTensor()[0], required_pv);
|
||||||
next_tensors.push_back(op_->impl()->OutputsTensor()[0]);
|
next_tensors.push_back(op_->impl()->OutputsTensor()[0]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue