提交 4773a217 编写于 作者: littletomatodonkey's avatar littletomatodonkey

fix opt

上级 ab3735a4
......@@ -23,7 +23,7 @@ import paddle.nn as nn
import paddle.nn.functional as F
from paddle.nn import Conv2d, BatchNorm, Linear, Dropout
from paddle.nn import AdaptiveAvgPool2d, MaxPool2d, AvgPool2d
from paddle.regularizer import L2Decay
from paddle.fluid.regularizer import L2Decay
import math
......
......@@ -24,7 +24,7 @@ from paddle import ParamAttr
from paddle.nn.initializer import MSRA
from paddle.nn import Conv2d, BatchNorm, Linear, Dropout
from paddle.nn import AdaptiveAvgPool2d, MaxPool2d, AvgPool2d
from paddle.regularizer import L2Decay
from paddle.fluid.regularizer import L2Decay
__all__ = ["ResNeSt50_fast_1s1x64d", "ResNeSt50"]
......
......@@ -19,6 +19,7 @@ from __future__ import print_function
import sys
import paddle
import paddle.fluid.regularizer as regularizer
__all__ = ['OptimizerBuilder']
......@@ -36,7 +37,7 @@ class L1Decay(object):
self.factor = factor
def __call__(self):
reg = paddle.regularizer.L1Decay(self.factor)
reg = regularizer.L1Decay(self.factor)
return reg
......@@ -53,7 +54,7 @@ class L2Decay(object):
self.factor = factor
def __call__(self):
reg = paddle.regularizer.L2Decay(self.factor)
reg = regularizer.L2Decay(self.factor)
return reg
......
......@@ -37,7 +37,8 @@ def check_version():
"or a suitable develop version is satisfied as well. \n" \
"Please make sure the version is good with your code."
try:
paddle.utils.require_version('0.0.0')
pass
# paddle.utils.require_version('0.0.0')
except Exception:
logger.error(err)
sys.exit(1)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册