diff --git a/ppcls/arch/backbone/legendary_models/mobilenet_v1.py b/ppcls/arch/backbone/legendary_models/mobilenet_v1.py index 3e612068399b1a08ae17db8161fad1931774012e..499fad7f5fd836e8a1820b48344c66484abf339b 100644 --- a/ppcls/arch/backbone/legendary_models/mobilenet_v1.py +++ b/ppcls/arch/backbone/legendary_models/mobilenet_v1.py @@ -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)