mirror of
https://github.com/ArthurDanjou/handson-ml3.git
synced 2026-01-14 12:14:36 +01:00
Remove a warning when computing left_proba
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user