leon 5 mesi fa
parent
commit
b9f481a96d
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      src/resnet.cu

+ 1 - 1
src/resnet.cu

@@ -292,7 +292,7 @@ class InferImpl : public Infer {
     isdynamic_model_ = trt_->has_dynamic_dim();
 
     normalize_ = Norm::alpha_beta(1 / 255.0f, 0.0f, ChannelType::SwapRB);
-    num_classes_ = bbox_head_dims_[2] - 5;
+    num_classes_ = trt_->static_dims(1)[1];
     return true;
   }