Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So that it does not record NaN. Now gif is always generated after an evaluation.
For the case you do not want this pull request, I divided this pr from the reward clipping one #3.
I think the gif file size could be a problem. When I tested, if the agent got stuck in a loop, the size of a gif file created is about 180 MB big. In worst case, the disk usage for gif files would be about 150 * 180 MB = 27 GB. And I think maybe in average case it is about 16GB (On my training, 78 of 150 was the unfinished first evaluation game case, and rest 72 was the finished case whose gif files have disk usage about 1.7GB. So, 78 * 180 MB + 1.7 GB = 14GB + 1.7 GB = about 16 GB).
It would be not a problem when a machine has a sufficient disk space. Considering tensorflow save model files have disk usage about 12GB, over 28GB disk space is required to run the train code.