提交 cf309ac2 编写于 作者: Y Yancey1989

fix fast imagenet with py3

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