Skip to content

Commit

Permalink
adjust collab
Browse files Browse the repository at this point in the history
  • Loading branch information
lisa-sousa committed Sep 10, 2024
1 parent d08fbf3 commit de3b299
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 43 deletions.
47 changes: 24 additions & 23 deletions xai-for-transformer/1-Tutorial_Transformer_Model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,20 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"#from google.colab import drive\n",
"# Mount drive folder to dbe abale to download repo\n",
"# from google.colab import drive\n",
"# drive.mount('/content/drive')\n",
"\n",
"#drive.mount('/content/drive')\n",
"\n",
"#%cd /content/drive/MyDrive\n",
"# Switch to correct folder'\n",
"# %cd /content/drive/MyDrive\n",
"\n",
"# Don't run this cell if you already cloned the repo \n",
"#!git clone --branch main https://github.com/HelmholtzAI-Consultants-Munich/XAI-Tutorials.git\n",
"#%cd XAI-Tutorials"
"# !git clone --branch main https://github.com/HelmholtzAI-Consultants-Munich/XAI-Tutorials.git\n",
"# %cd XAI-Tutorials"
]
},
{
Expand All @@ -76,7 +77,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -140,7 +141,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -175,7 +176,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -255,7 +256,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -311,7 +312,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -357,7 +358,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -419,7 +420,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -435,7 +436,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -462,7 +463,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -480,7 +481,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -505,7 +506,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 12,
"metadata": {},
"outputs": [
{
Expand All @@ -519,7 +520,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "bc7d082b83534da5b72c046e0229b3ab",
"model_id": "98e197577f6044a58af8d8556db555fa",
"version_major": 2,
"version_minor": 0
},
Expand All @@ -533,7 +534,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "012054119a834e7a964b4dced2a68006",
"model_id": "d106c89d22f444cab972aa2ff1d2c298",
"version_major": 2,
"version_minor": 0
},
Expand Down Expand Up @@ -567,7 +568,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -581,7 +582,7 @@
" save_total_limit=3,\n",
" num_train_epochs=10,\n",
" predict_with_generate=True,\n",
" fp16=True, \n",
" fp16=False, \n",
" push_to_hub=False,\n",
")"
]
Expand All @@ -597,7 +598,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
Expand Down
15 changes: 8 additions & 7 deletions xai-for-transformer/2-Tutorial_AttentionMaps_Text.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,16 @@
"metadata": {},
"outputs": [],
"source": [
"#from google.colab import drive\n",
"# Mount drive folder to dbe abale to download repo\n",
"# from google.colab import drive\n",
"# drive.mount('/content/drive')\n",
"\n",
"#drive.mount('/content/drive')\n",
"\n",
"#%cd /content/drive/MyDrive\n",
"# Switch to correct folder'\n",
"# %cd /content/drive/MyDrive\n",
"\n",
"# Don't run this cell if you already cloned the repo \n",
"#!git clone --branch main https://github.com/HelmholtzAI-Consultants-Munich/XAI-Tutorials.git\n",
"#%cd XAI-Tutorials"
"# !git clone --branch main https://github.com/HelmholtzAI-Consultants-Munich/XAI-Tutorials.git\n",
"# %cd XAI-Tutorials"
]
},
{
Expand Down Expand Up @@ -508,7 +509,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.4"
"version": "3.10.13"
}
},
"nbformat": 4,
Expand Down
15 changes: 8 additions & 7 deletions xai-for-transformer/3-Tutorial_VIT_Model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"If you installed the packages and requirements on your machine, you can skip this section and start from the import section.\n",
"Otherwise, you can follow and execute the tutorial on your browser. To start working on the notebook, click on the following button. This will open this page in the Colab environment and you will be able to execute the code on your own.\n",
"\n",
"<a href=\"https://colab.research.google.com/github/HelmholtzAI-Consultants-Munich/XAI-Tutorials/blob/main/data_and_models/3-Tutorial_VIT_Model.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
"<a href=\"https://colab.research.google.com/github/HelmholtzAI-Consultants-Munich/XAI-Tutorials/blob/main/xai-for-transformer/3-Tutorial_VIT_Model.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
Expand All @@ -56,15 +56,16 @@
"metadata": {},
"outputs": [],
"source": [
"#from google.colab import drive\n",
"# Mount drive folder to dbe abale to download repo\n",
"# from google.colab import drive\n",
"# drive.mount('/content/drive')\n",
"\n",
"#drive.mount('/content/drive')\n",
"\n",
"#%cd /content/drive/MyDrive\n",
"# Switch to correct folder'\n",
"# %cd /content/drive/MyDrive\n",
"\n",
"# Don't run this cell if you already cloned the repo \n",
"#!git clone --branch main https://github.com/HelmholtzAI-Consultants-Munich/XAI-Tutorials.git\n",
"#%cd XAI-Tutorials"
"# !git clone --branch main https://github.com/HelmholtzAI-Consultants-Munich/XAI-Tutorials.git\n",
"# %cd XAI-Tutorials"
]
},
{
Expand Down
13 changes: 7 additions & 6 deletions xai-for-transformer/4-Tutorial_AttentionMaps_Images.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,16 @@
"metadata": {},
"outputs": [],
"source": [
"#from google.colab import drive\n",
"# Mount drive folder to dbe abale to download repo\n",
"# from google.colab import drive\n",
"# drive.mount('/content/drive')\n",
"\n",
"#drive.mount('/content/drive')\n",
"\n",
"#%cd /content/drive/MyDrive\n",
"# Switch to correct folder'\n",
"# %cd /content/drive/MyDrive\n",
"\n",
"# Don't run this cell if you already cloned the repo \n",
"#!git clone --branch main https://github.com/HelmholtzAI-Consultants-Munich/XAI-Tutorials.git\n",
"#%cd XAI-Tutorials"
"# !git clone --branch main https://github.com/HelmholtzAI-Consultants-Munich/XAI-Tutorials.git\n",
"# %cd XAI-Tutorials"
]
},
{
Expand Down

0 comments on commit de3b299

Please sign in to comment.