Skip to content

Commit b3cbf8d

Browse files
committed
add dependencies to L3 solutions
1 parent ae66126 commit b3cbf8d

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

lab3/solutions/RL_Solution.ipynb

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@
8989
"id": "EvdePP-VyVWp"
9090
},
9191
"source": [
92+
"#Install some dependencies for visualizing the agents\n",
93+
"!apt-get install -y xvfb python-opengl x11-utils > /dev/null 2>&1\n",
94+
"!pip install gym pyvirtualdisplay scikit-video > /dev/null 2>&1\n",
95+
"\n",
9296
"# Import Tensorflow 2.0\n",
9397
"%tensorflow_version 2.x\n",
9498
"import tensorflow as tf\n",
@@ -241,7 +245,7 @@
241245
"\n",
242246
"cartpole_model = create_cartpole_model()"
243247
],
244-
"execution_count": null,
248+
"execution_count": 6,
245249
"outputs": []
246250
},
247251
{
@@ -289,7 +293,7 @@
289293
"\n",
290294
" return action[0] if single else action"
291295
],
292-
"execution_count": null,
296+
"execution_count": 7,
293297
"outputs": []
294298
},
295299
{
@@ -352,7 +356,7 @@
352356
"# Instantiate a single Memory buffer\n",
353357
"memory = Memory()"
354358
],
355-
"execution_count": null,
359+
"execution_count": 8,
356360
"outputs": []
357361
},
358362
{
@@ -404,7 +408,7 @@
404408
" \n",
405409
" return normalize(discounted_rewards)"
406410
],
407-
"execution_count": null,
411+
"execution_count": 9,
408412
"outputs": []
409413
},
410414
{
@@ -448,7 +452,7 @@
448452
" # loss = tf.reduce_mean('''TODO''')\n",
449453
" return loss"
450454
],
451-
"execution_count": null,
455+
"execution_count": 10,
452456
"outputs": []
453457
},
454458
{
@@ -482,7 +486,7 @@
482486
" # grads = tape.gradient('''TODO''', model.trainable_variables)\n",
483487
" optimizer.apply_gradients(zip(grads, model.trainable_variables))\n"
484488
],
485-
"execution_count": null,
489+
"execution_count": 11,
486490
"outputs": []
487491
},
488492
{

0 commit comments

Comments
 (0)