Selaa lähdekoodia

fix for exporting with pretrain

gaotingquan 1 vuosi sitten
vanhempi
commit
d863849c1c

+ 8 - 1
paddlex/repo_apis/PaddleClas_api/cls/register.py

@@ -1,5 +1,5 @@
 # copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
-# 
+#
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
@@ -491,6 +491,13 @@ register_model_info({
 register_model_info({
     'model_name': 'ConvNeXt_large_224',
     'suite': 'Cls',
+    'config_path': osp.join(PDX_CONFIG_DIR, 'ConvNeXt_large_224.yaml'),
+    'supported_apis': ['train', 'evaluate', 'predict', 'export'],
+})
+
+register_model_info({
+    'model_name': 'ConvNeXt_large_384',
+    'suite': 'Cls',
     'config_path': osp.join(PDX_CONFIG_DIR, 'ConvNeXt_large_384.yaml'),
     'supported_apis': ['train', 'evaluate', 'predict', 'export'],
 })

+ 1 - 2
paddlex/repo_apis/PaddleSeg_api/configs/SeaFormer_large.yaml

@@ -6,7 +6,6 @@ model:
   backbone: 
     type: SeaFormer_large
     pretrained: https://bj.bcebos.com/paddleseg/dygraph/ade20k/backbone/seaformer_large_imagenet_pretrained.pdparams
-  num_classes: 150
   head_channels: 192
   embed_dims: [128, 160, 192]
   in_index: [0, 1, 2, 3]
@@ -64,4 +63,4 @@ lr_scheduler:
 loss:
   types:
     - type: CrossEntropyLoss
-  coef: [1]
+  coef: [1]

+ 1 - 2
paddlex/repo_apis/PaddleSeg_api/configs/SeaFormer_small.yaml

@@ -6,7 +6,6 @@ model:
   backbone: 
     type: SeaFormer_small
     pretrained: https://bj.bcebos.com/paddleseg/dygraph/ade20k/backbone/seaformer_small_imagenet_pretrained.pdparams
-  num_classes: 150
   head_channels: 128
   embed_dims: [96, 128]
   is_dw: True
@@ -67,4 +66,4 @@ lr_scheduler:
 loss:
   types:
     - type: CrossEntropyLoss
-  coef: [1]
+  coef: [1]

+ 1 - 2
paddlex/repo_apis/PaddleSeg_api/configs/SeaFormer_tiny.yaml

@@ -6,7 +6,6 @@ model:
   backbone: 
     type: SeaFormer_tiny
     pretrained: https://bj.bcebos.com/paddleseg/dygraph/ade20k/backbone/seaformer_tiny_imagenet_pretrained.pdparams
-  num_classes: 150
   head_channels: 96
   embed_dims: [64, 96]
   is_dw: True
@@ -67,4 +66,4 @@ lr_scheduler:
 loss:
   types:
     - type: CrossEntropyLoss
-  coef: [1]
+  coef: [1]