implement pdfromlatent in BernoulliPdType (#81)

* implement pdfromlatent in BernoulliPdType

* remove env.close() at the end of algorithms

* test case for environment after learn

* closing env in run.py

* fixes for acktr and trpo_mpi

* add make_session with new graph for every call in test_env_after_learn

* remove extra prints from test_env_after_learn
This commit is contained in:
pzhokhov
2018-09-06 16:17:59 -07:00
committed by Peter Zhokhov
parent 565b2153d7
commit 75b93b890e
7 changed files with 34 additions and 5 deletions

View File

@@ -208,7 +208,8 @@ def main():
logger.configure(format_strs=[])
rank = MPI.COMM_WORLD.Get_rank()
model, _ = train(args, extra_args)
model, env = train(args, extra_args)
env.close()
if args.save_path is not None and rank == 0:
save_path = osp.expanduser(args.save_path)
@@ -227,6 +228,7 @@ def main():
if done:
obs = env.reset()
env.close()
if __name__ == '__main__':
main()