提交 40085883 编写于 作者: G gaotingquan 提交者: Wei Shengyu

add amp decorator and parse_batch decorator

上级 32593b63
......@@ -22,6 +22,8 @@ from paddle.nn import Conv2D, BatchNorm, Linear, ReLU, Flatten
from paddle.nn import AdaptiveAvgPool2D
from paddle.nn.initializer import KaimingNormal
from ..base import clas_forward_decorator
from ....utils.amp import AMP_forward_decorator
from ..base.theseus_layer import TheseusLayer
from ....utils.save_load import load_dygraph_pretrain, load_dygraph_pretrain_from_url
......@@ -162,6 +164,8 @@ class MobileNet(TheseusLayer):
return_patterns=return_patterns,
return_stages=return_stages)
@AMP_forward_decorator
@clas_forward_decorator
def forward(self, x):
x = self.conv(x)
x = self.blocks(x)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册