Remove a warning when computing left_proba
parent
b2a2533543
commit
4f5aa43f92
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue