未验证 提交 c532687e 编写于 作者: D deqiangc 提交者: GitHub

Handle no bias vector in transpose_conv kernel (#1004)

Bias vector can be nullptr in tranpose_conv; hence
should do a check before deallocate.

BUG=#993
Co-authored-by: NTing Yan <94130036+tingyan19@users.noreply.github.com>
上级 bd4149f7
......@@ -133,7 +133,9 @@ TfLiteStatus CalculateOpData(TfLiteContext* context, TfLiteNode* node,
micro_context->DeallocateTempTfLiteTensor(input);
micro_context->DeallocateTempTfLiteTensor(filter);
micro_context->DeallocateTempTfLiteTensor(output);
micro_context->DeallocateTempTfLiteTensor(bias);
if (bias != nullptr) {
micro_context->DeallocateTempTfLiteTensor(bias);
}
}
return kTfLiteOk;
}
......
......@@ -132,7 +132,9 @@ TfLiteStatus CalculateOpData(TfLiteContext* context, TfLiteNode* node,
micro_context->DeallocateTempTfLiteTensor(input);
micro_context->DeallocateTempTfLiteTensor(output);
micro_context->DeallocateTempTfLiteTensor(filter);
micro_context->DeallocateTempTfLiteTensor(bias);
if (bias != nullptr) {
micro_context->DeallocateTempTfLiteTensor(bias);
}
}
return kTfLiteOk;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册