|
|
|
@ -29,7 +29,7 @@ def main():
|
|
|
|
|
else:
|
|
|
|
|
paddle.init(
|
|
|
|
|
use_gpu=False,
|
|
|
|
|
trainer_count=1,
|
|
|
|
|
trainer_count=2,
|
|
|
|
|
port=7164,
|
|
|
|
|
ports_num=1,
|
|
|
|
|
ports_num_for_sparse=1,
|
|
|
|
@ -69,7 +69,7 @@ def main():
|
|
|
|
|
def event_handler(event):
|
|
|
|
|
if isinstance(event, paddle.event.EndIteration):
|
|
|
|
|
if event.batch_id % 100 == 0:
|
|
|
|
|
trainer.save_parameter("output", "batch-" + str(event.batch_id))
|
|
|
|
|
trainer.save_parameter_to_tar("output", "batch-" + str(event.batch_id))
|
|
|
|
|
result = trainer.test(
|
|
|
|
|
paddle.batch(
|
|
|
|
|
paddle.dataset.imikolov.test(word_dict, N), 32))
|
|
|
|
|