未验证 提交 d88deaf3 编写于 作者: H haoyuying 提交者: GitHub

Fix the compatibility issue of ocrnet on paddlepaddle 2.1

上级 63806e61
......@@ -15,7 +15,6 @@
import paddle
import paddle.nn as nn
import paddle.nn.functional as F
from paddle.nn.layer import activation
from paddle.nn import Conv2D, AvgPool2D
......@@ -214,7 +213,7 @@ class Activation(nn.Layer):
super(Activation, self).__init__()
self._act = act
upper_act_names = activation.__all__
upper_act_names = nn.layer.activation.__dict__.keys()
lower_act_names = [act.lower() for act in upper_act_names]
act_dict = dict(zip(lower_act_names, upper_act_names))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册