提交 07089dcf 编写于 作者: W weishengyu

move identity_head to gears

上级 e8959c31
class IdentityHead(nn.Layer):
def __init__(self):
super(IdentityHead, self).__init__()
def forward(self, x, label=None):
return {"features": x, "logits": None}
\ No newline at end of file
......@@ -24,10 +24,9 @@ import paddle
import paddle.nn as nn
from ppcls.utils import config
from ppcls.engine.trainer import Trainer
from ppcls.arch import build_model, RecModel
from ppcls.arch.backbone.base.theseus_layer import Identity
from ppcls.utils.save_load import load_dygraph_pretrain
from ppcls.arch.gears.identity_head import IdentityHead
class ExportModel(nn.Layer):
......@@ -62,14 +61,6 @@ class ExportModel(nn.Layer):
return x
class IdentityHead(nn.Layer):
def __init__(self):
super(IdentityHead, self).__init__()
def forward(self, x, label=None):
return {"features": x, "logits": None}
if __name__ == "__main__":
args = config.parse_args()
config = config.get_config(args.config, overrides=args.override, show=True)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册