Revert "commit"

This reverts commit e0f883e66b.
port
sneaxiy 7 years ago
parent 090cd0ab48
commit 882a9327ae

Binary file not shown.

@ -156,23 +156,15 @@ def train(avg_loss, infer_prog, optimizer, train_reader, test_reader, batch_acc,
start_time = time.time()
num_samples = 0
if arg.profile and pass_id == 0 and batch_id == 5:
profiler.start_profiler("All")
elif args.profile and pass_id == 0 and batch_id == 10:
profiler.stop_profiler("total", "/tmp/profile")
if args.use_reader_op:
try:
loss = exe.run(train_prog,
fetch_list=[avg_loss],
use_program_cache=True)
loss = exe.run(train_prog, fetch_list=[avg_loss])
except fluid.core.EnforceNotMet as ex:
break
else:
loss = exe.run(train_prog,
feed=feeder.feed(data),
fetch_list=[avg_loss],
use_program_cache=True)
fetch_list=[avg_loss])
iters += 1
batch_id += 1
# FIXME(wuyi): For use_reader_op, if the current

Loading…
Cancel
Save