Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
User committed Oct 11, 2020
1 parent 2b783e4 commit ce468b7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
8 changes: 7 additions & 1 deletion pytorch/plot_rl_rewards.py
Expand Up @@ -11,6 +11,12 @@

print(f"average reward: {a.mean():.2f}, min: {a.min():.2f}, max: {a.max():.2f}")

plt.hist(a, bins=20)
if args.mode == 'train':
# show the training progress
plt.plot(a)
else:
# test - show a histogram of rewards
plt.hist(a, bins=20)

plt.title(args.mode)
plt.show()
8 changes: 7 additions & 1 deletion rl/plot_rl_rewards.py
Expand Up @@ -11,6 +11,12 @@

print(f"average reward: {a.mean():.2f}, min: {a.min():.2f}, max: {a.max():.2f}")

plt.hist(a, bins=20)
if args.mode == 'train':
# show the training progress
plt.plot(a)
else:
# test - show a histogram of rewards
plt.hist(a, bins=20)

plt.title(args.mode)
plt.show()
8 changes: 7 additions & 1 deletion tf2.0/plot_rl_rewards.py
Expand Up @@ -11,6 +11,12 @@

print(f"average reward: {a.mean():.2f}, min: {a.min():.2f}, max: {a.max():.2f}")

plt.hist(a, bins=20)
if args.mode == 'train':
# show the training progress
plt.plot(a)
else:
# test - show a histogram of rewards
plt.hist(a, bins=20)

plt.title(args.mode)
plt.show()

0 comments on commit ce468b7

Please sign in to comment.