Skip to content

Commit

Permalink
Remove a warning when computing left_proba
Browse files Browse the repository at this point in the history
  • Loading branch information
ageron committed Jan 19, 2024
1 parent b2a2533 commit 4f5aa43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion 18_reinforcement_learning.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@
"# extra code – a function that creates an animation for a given policy model\n",
"\n",
"def pg_policy(obs):\n",
" left_proba = model.predict(obs[np.newaxis], verbose=0)\n",
" left_proba = model.predict(obs[np.newaxis], verbose=0)[0][0]\n",
" return int(np.random.rand() > left_proba)\n",
"\n",
"np.random.seed(42)\n",
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ dependencies:
- tensorflow~=2.14.0 # Deep Learning library
- transformers~=4.35.0 # Natural Language Processing lib for TF or PyTorch
- urlextract~=1.8.0 # optionally used in chapter 3, exercise 4
- gym[classic_control,atari,accept-rom-license] # used only in ch18
- gymnasium[classic_control,atari,accept-rom-license] # used only in ch18
- google-cloud-aiplatform~=1.36.2 # used only in chapter 19
- google-cloud-storage~=2.13.0 # used only in chapter 19

0 comments on commit 4f5aa43

Please sign in to comment.