提交 b662ed34 编写于 作者: W weishengyu

dbg

上级 18d99b01
......@@ -40,7 +40,7 @@ class GalleryLayer(paddle.nn.Layer):
gallery_labels.append(line[1].strip())
self.gallery_layer = paddle.nn.Linear(embedding_size, len(self.gallery_images), bias_attr=False)
def forward(self, x):
def forward(self, x, label=None):
x = paddle.nn.functional.normalize(x)
x = self.gallery_layer(x)
return x
......@@ -72,7 +72,7 @@ def export_fuse_model(configs):
configs["Slim"] = None
fuse_model = build_model(configs)
fuse_model.head = GalleryLayer(configs)
configs["slim"] = slim_config
configs["Slim"] = slim_config
quantize_model(configs, fuse_model)
load_dygraph_pretrain(fuse_model, configs["Global"]["pretrained_model"])
fuse_model.eval()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册