Skip to content

Commit 415460b

Browse files
committed
stash
1 parent e412b1a commit 415460b

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

python/paddle/fluid/tests/unittests/test_parallel_executor.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -229,13 +229,13 @@ def check_network_convergence(self,
229229
if batch_size is not None:
230230
batch_size *= fluid.core.get_cuda_device_count()
231231
begin = time.time()
232-
first_loss, = exe.run([loss.name], feed_dict=feed_dict)
232+
first_loss, = exe.run([loss.name], feed=feed_dict)
233233
first_loss = numpy.array(first_loss)
234234

235235
for i in xrange(iter):
236-
exe.run([], feed_dict=feed_dict)
236+
exe.run([], feed=feed_dict)
237237

238-
last_loss, = exe.run([loss.name], feed_dict=feed_dict)
238+
last_loss, = exe.run([loss.name], feed=feed_dict)
239239
end = time.time()
240240

241241
if batch_size is not None:
@@ -277,11 +277,10 @@ def test_simple_fc(self):
277277
"label": label})
278278

279279
def test_simple_fc_parallel_accuracy(self):
280-
single_first_loss, single_last_loss = self.check_network_convergence(
281-
simple_fc_net, seed=0, use_parallel_executor=False)
282-
parallel_first_loss, parallel_last_loss = self.check_network_convergence(
283-
simple_fc_net, seed=0, use_parallel_executor=True)
284-
print("FUCK")
280+
#single_first_loss, single_last_loss = self.check_network_convergence(
281+
# simple_fc_net, seed=0, use_parallel_executor=False)
282+
#parallel_first_loss, parallel_last_loss = self.check_network_convergence(
283+
# simple_fc_net, seed=0, use_parallel_executor=True)
285284
print('single_first_loss=', single_first_loss)
286285
print('single_last_loss=', single_last_loss)
287286
print('parallel_first_loss=', parallel_first_loss)
@@ -515,10 +514,10 @@ def test_parallel_testing(self):
515514
share_vars_from=train_exe)
516515

517516
for i in xrange(5):
518-
test_loss, = test_exe.run([loss.name], feed_dict=feed_dict)
517+
test_loss, = test_exe.run([loss.name], feed=feed_dict)
519518
test_loss = numpy.array(test_loss)
520519

521-
train_loss, = train_exe.run([loss.name], feed_dict=feed_dict)
520+
train_loss, = train_exe.run([loss.name], feed=feed_dict)
522521
train_loss = numpy.array(train_loss)
523522
self.assertTrue(
524523
numpy.allclose(
@@ -668,5 +667,5 @@ def test_all(self):
668667
for i in xrange(10):
669668
cur_batch = next(data)
670669
print map(numpy.array,
671-
pe.run(feed_dict=feeder.feed(cur_batch),
670+
pe.run(feed=feeder.feed(cur_batch),
672671
fetch_list=[avg_cost.name]))[0]

0 commit comments

Comments
 (0)