!30442 [MS][LITE][1.6]fix fp16 weight model inference error

Merge pull request !30442 from XianglongZeng/r1.6
This commit is contained in:
i-robot 2022-02-24 02:25:54 +00:00 committed by Gitee
commit 1ee57386ba
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 4 additions and 0 deletions

View File

@ -71,6 +71,7 @@ int DeconvolutionDepthwiseCPUKernel::Prepare() {
CHECK_LESS_RETURN(in_tensors_.size(), C2NUM);
CHECK_LESS_RETURN(out_tensors_.size(), 1);
CHECK_NULL_RETURN(conv_param_);
UpdateOriginWeightAndBias();
sliding_ = new (std::nothrow) SlidingWindowParam;
if (sliding_ == nullptr) {

View File

@ -167,6 +167,8 @@ int DeConvolutionCPUKernel::Prepare() {
CHECK_NULL_RETURN(conv_param_);
CHECK_NULL_RETURN(in_tensors_.at(kInputIndex));
CHECK_NULL_RETURN(in_tensors_.at(kWeightIndex));
// There could be weight dataType casting before Prepare, thus weight update is required.
UpdateOriginWeightAndBias();
#if defined(ENABLE_ARM32) || defined(ENABLE_AVX) || defined(ENABLE_SSE)
row_tile_ = C4NUM;

View File

@ -378,6 +378,7 @@ int DeConvolutionWinogradCPUKernel::Prepare() {
CHECK_NULL_RETURN(in_tensors_.at(kWeightIndex));
CHECK_NULL_RETURN(out_tensors_.at(kOutputIndex));
CHECK_NULL_RETURN(conv_param_);
UpdateOriginWeightAndBias();
deconv_param_ = new (std::nothrow) DeConvParam();
if (deconv_param_ == nullptr) {