未验证 提交 b17e36a4 编写于 作者: Z zlsh80826 提交者: GitHub

[PaddleTRT] Yolov3 bugfix (#32064)

* fix yolobox teller condition

* fix cuda double free bug
上级 6d6ea569
...@@ -206,7 +206,7 @@ bool OpTeller::Tell(const framework::ir::Node* node, bool use_no_calib_int8, ...@@ -206,7 +206,7 @@ bool OpTeller::Tell(const framework::ir::Node* node, bool use_no_calib_int8,
(desc.HasAttr("class_num") && desc.HasAttr("anchors") && (desc.HasAttr("class_num") && desc.HasAttr("anchors") &&
desc.HasAttr("downsample_ratio") && desc.HasAttr("conf_thresh") && desc.HasAttr("downsample_ratio") && desc.HasAttr("conf_thresh") &&
desc.HasAttr("clip_bbox") && desc.HasAttr("scale_x_y")); desc.HasAttr("clip_bbox") && desc.HasAttr("scale_x_y"));
return has_attrs; if (!has_attrs) return false;
} }
if (op_type == "affine_channel") { if (op_type == "affine_channel") {
......
...@@ -283,10 +283,7 @@ void YoloBoxPlugin::serialize(void* buffer) const { ...@@ -283,10 +283,7 @@ void YoloBoxPlugin::serialize(void* buffer) const {
SerializeValue(&buffer, input_w_); SerializeValue(&buffer, input_w_);
} }
void YoloBoxPlugin::destroy() { void YoloBoxPlugin::destroy() {}
cudaFree(anchors_device_);
delete this;
}
void YoloBoxPlugin::setPluginNamespace(const char* lib_namespace) { void YoloBoxPlugin::setPluginNamespace(const char* lib_namespace) {
namespace_ = std::string(lib_namespace); namespace_ = std::string(lib_namespace);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册