|
|
|
|
|
|
{ |
|
|
|
"cell_type": "code", |
|
|
|
"execution_count": null, |
|
|
|
"metadata": {}, |
|
|
|
"metadata": { |
|
|
|
"collapsed": true |
|
|
|
}, |
|
|
|
"outputs": [], |
|
|
|
"source": [ |
|
|
|
"env = UnityEnvironment(file_name=env_name, curriculum=curriculum_file)\n", |
|
|
|
|
|
|
"cell_type": "code", |
|
|
|
"execution_count": null, |
|
|
|
"metadata": { |
|
|
|
"collapsed": true, |
|
|
|
"scrolled": true |
|
|
|
}, |
|
|
|
"outputs": [], |
|
|
|
|
|
|
" trainer.update_model(batch_size, num_epoch)\n", |
|
|
|
" if steps % summary_freq == 0 and steps != 0 and train_model:\n", |
|
|
|
" # Write training statistics to tensorboard.\n", |
|
|
|
" trainer.write_summary(summary_writer, steps)\n", |
|
|
|
" trainer.write_summary(summary_writer, steps, env._curriculum.lesson_number)\n", |
|
|
|
" if steps % save_freq == 0 and steps != 0 and train_model:\n", |
|
|
|
" # Save Tensorflow model\n", |
|
|
|
" save_model(sess, model_path=model_path, steps=steps, saver=saver)\n", |
|
|
|