提交 823074d8 编写于 作者: W weishengyu

dbg

上级 d05d9d8d
import paddle
from ppcls.arch import build_model
from ppcls.utils.config import parse_config, parse_args
from ppcls.utils.save_load import load_dygraph_pretrain
def load_feature_extractor(configs):
arch = build_model(configs["Arch"])
load_dygraph_pretrain(arch, configs["Global"]["pretrained_model"])
def build_gallery_feature(feature_extractor):
......@@ -14,7 +20,7 @@ def save_fuse_model(fuse_model):
class FuseModel(paddle.nn.Layer):
def __init__(self, configs):
super().__init__()
self.feature_extractor = build_model(configs)
self.feature_extractor = load_feature_extractor(configs)
self.gallery_layer = build_gallery_feature(self.feature_extractor)
def forward(self, x):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册