cleanup notebooks

This commit is contained in:
Varuna Jayasiri
2024-06-24 16:17:09 +05:30
parent 26e64a8827
commit 391fa39167
22 changed files with 2305 additions and 5064 deletions

View File

@ -25,7 +25,6 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
@ -33,10 +32,11 @@
"id": "ZCzmCrAIVg0L",
"outputId": "028e759e-0c9f-472e-b4b8-fdcf3e4604ee"
},
"outputs": [],
"source": [
"!pip install labml-nn"
]
],
"outputs": [],
"execution_count": null
},
{
"cell_type": "markdown",
@ -47,15 +47,15 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"! wget http://www.atarimania.com/roms/Roms.rar\n",
"! mkdir /content/ROM/\n",
"! unrar e /content/Roms.rar /content/ROM/\n",
"! python -m atari_py.import_roms /content/ROM/"
]
],
"outputs": [],
"execution_count": null
},
{
"cell_type": "markdown",
@ -68,16 +68,16 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "0hJXx_g0wS2C"
},
"outputs": [],
"source": [
"from labml import experiment\n",
"from labml.configs import FloatDynamicHyperParam, IntDynamicHyperParam\n",
"from labml_nn.rl.ppo.experiment import Trainer"
]
],
"outputs": [],
"execution_count": null
},
{
"cell_type": "markdown",
@ -90,14 +90,14 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "bFcr9k-l4cAg"
},
"outputs": [],
"source": [
"experiment.create(name=\"ppo\")"
]
],
"outputs": [],
"execution_count": null
},
{
"cell_type": "markdown",
@ -113,11 +113,9 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "Piz0c5f44hRo"
},
"outputs": [],
"source": [
"configs = {\n",
" # number of updates\n",
@ -139,7 +137,9 @@
" # Learning rate\n",
" 'learning_rate': FloatDynamicHyperParam(2.5e-4, (0, 1e-3)),\n",
"}"
]
],
"outputs": [],
"execution_count": null
},
{
"cell_type": "markdown",
@ -152,7 +152,6 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
@ -161,10 +160,11 @@
"id": "e6hmQhTw4nks",
"outputId": "0e978879-5dcd-4140-ec53-24a3fbd547de"
},
"outputs": [],
"source": [
"experiment.configs(configs)"
]
],
"outputs": [],
"execution_count": null
},
{
"cell_type": "markdown",
@ -177,14 +177,14 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "8LB7XVViYuPG"
},
"outputs": [],
"source": [
"trainer = Trainer(**configs)"
]
],
"outputs": [],
"execution_count": null
},
{
"cell_type": "markdown",
@ -197,15 +197,15 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "aIAWo7Fw5DR8"
},
"outputs": [],
"source": [
"with experiment.start():\n",
" trainer.run_training_loop()"
]
],
"outputs": [],
"execution_count": null
}
],
"metadata": {