leon 1 月之前
父节点
当前提交
8158ab4450
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/infer/trt/depth/depth.cu

+ 3 - 1
src/infer/trt/depth/depth.cu

@@ -20,7 +20,9 @@ bool DepthModelImpl::load(const std::string &engine_file)
     network_input_width_ = input_dim[3];
     network_input_height_ = input_dim[2];
     isdynamic_model_ = trt_->has_dynamic_dim();
-    normalize_ = affine::Norm::mean_std({0.485f, 0.456f, 0.406f}, {0.229f, 0.224f, 0.225f}, 1 / 255.0f, affine::ChannelType::SwapRB);
+    float mean[3] = {0.485f, 0.456f, 0.406f};
+    float std[3] = {0.229f, 0.224f, 0.225f};
+    normalize_ = affine::Norm::mean_std(mean, std, 1 / 255.0f, affine::ChannelType::SwapRB);
     // normalize_ = affine::Norm::alpha_beta(1 / 255.0f, 0.0f, affine::ChannelType::SwapRB);
     return true;
 }