未验证 提交 2a73d909 编写于 作者: R ruri 提交者: GitHub

Merge pull request #2007 from Yancey1989/fix_py3

fix fast imagenet with py3
......@@ -335,7 +335,7 @@ def print_paddle_envs():
print("DEVICE_NUM: %d" % DEVICE_NUM)
for k in os.environ:
if "PADDLE_" in k:
print "ENV %s:%s" % (k, os.environ[k])
print("ENV %s:%s" % (k, os.environ[k]))
print('------------------------------------------------')
......
......@@ -22,8 +22,6 @@ import time
import os
import math
import cProfile, pstats, StringIO
import paddle
import paddle.fluid as fluid
import paddle.fluid.core as core
......@@ -135,7 +133,7 @@ def lr_decay(lrs, epochs, bs, total_image):
step += 1
ratio = (lrs[idx][1] - lrs[idx][0])*1.0 / (epoch[1] - epoch[0])
lr_base = lrs[idx][0]
for s in xrange(epoch[0], epoch[1]):
for s in range(epoch[0], epoch[1]):
if boundaries:
boundaries.append(boundaries[-1] + step + 1)
else:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册