未验证 提交 3845229d 编写于 作者: W wuhuachaocoding 提交者: GitHub

update for py3.6 bug (#46304)

上级 3441e5e8
......@@ -13,6 +13,7 @@
# limitations under the License.
import os
import paddle
from paddle.fluid import framework, core, layers, unique_name
from paddle.fluid.framework import Variable
from paddle.fluid.clip import ClipGradByGlobalNorm
......@@ -287,9 +288,8 @@ class DistributedFusedLamb(Optimizer):
step = self._get_or_create_step()
from paddle.distributed import get_rank, get_world_size
rank = get_rank()
nranks = get_world_size()
rank = paddle.distributed.get_rank()
nranks = paddle.distributed.get_world_size()
if self._nproc_per_node is None:
nproc_per_node = nranks
else:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册