Commit
·
0e4e47c
1
Parent(s):
9ab4490
Upload semanticallysegmentdeezglaciers.ipynb
Browse files
semanticallysegmentdeezglaciers.ipynb
CHANGED
|
@@ -64,15 +64,24 @@
|
|
| 64 |
"# Set the allow_tf32 attribute of torch.backends.cuda.matmul to True to allow TensorFloat-32 (TF32) on Ampere devices\n",
|
| 65 |
"torch.backends.cuda.matmul.allow_tf32 = True\n",
|
| 66 |
"\n",
|
| 67 |
-
"# Call the notebook_login function to log in to Hugging Face's hub\n",
|
| 68 |
-
"notebook_login()\n",
|
| 69 |
-
"\n",
|
| 70 |
"# This code imports necessary modules and functions for a machine learning task. It sets up for tensor computations, deep learning, data visualization, working with transformer models, datasets, image manipulations, and more. It also logs into Hugging Face's hub.\n",
|
| 71 |
"\n",
|
| 72 |
"# This sets the model's huggingface URL\n",
|
| 73 |
"hf_model_name = \"glacierscopessegmentation/glacier_segmentation_transformer\"\n"
|
| 74 |
]
|
| 75 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
{
|
| 77 |
"cell_type": "code",
|
| 78 |
"execution_count": null,
|
|
@@ -166,7 +175,7 @@
|
|
| 166 |
"outputs": [],
|
| 167 |
"source": [
|
| 168 |
"# Load a dataset from Hugging Face's hub using the specified repository name\n",
|
| 169 |
-
"ds = load_dataset(\"
|
| 170 |
"\n",
|
| 171 |
"# Split the \"train\" subset of the dataset into a training set and a test set, with 5% of the data going to the test set\n",
|
| 172 |
"ds = ds[\"train\"].train_test_split(.05)\n",
|
|
|
|
| 64 |
"# Set the allow_tf32 attribute of torch.backends.cuda.matmul to True to allow TensorFloat-32 (TF32) on Ampere devices\n",
|
| 65 |
"torch.backends.cuda.matmul.allow_tf32 = True\n",
|
| 66 |
"\n",
|
|
|
|
|
|
|
|
|
|
| 67 |
"# This code imports necessary modules and functions for a machine learning task. It sets up for tensor computations, deep learning, data visualization, working with transformer models, datasets, image manipulations, and more. It also logs into Hugging Face's hub.\n",
|
| 68 |
"\n",
|
| 69 |
"# This sets the model's huggingface URL\n",
|
| 70 |
"hf_model_name = \"glacierscopessegmentation/glacier_segmentation_transformer\"\n"
|
| 71 |
]
|
| 72 |
},
|
| 73 |
+
{
|
| 74 |
+
"cell_type": "code",
|
| 75 |
+
"execution_count": null,
|
| 76 |
+
"metadata": {},
|
| 77 |
+
"outputs": [],
|
| 78 |
+
"source": [
|
| 79 |
+
"# Call the notebook_login function to log in to Hugging Face's hub\n",
|
| 80 |
+
"notebook_login()\n",
|
| 81 |
+
"\n",
|
| 82 |
+
"# make sure to login, or use the huggingface-cli to login"
|
| 83 |
+
]
|
| 84 |
+
},
|
| 85 |
{
|
| 86 |
"cell_type": "code",
|
| 87 |
"execution_count": null,
|
|
|
|
| 175 |
"outputs": [],
|
| 176 |
"source": [
|
| 177 |
"# Load a dataset from Hugging Face's hub using the specified repository name\n",
|
| 178 |
+
"ds = load_dataset(\"glacierscopessegmentation/secondleg\")\n",
|
| 179 |
"\n",
|
| 180 |
"# Split the \"train\" subset of the dataset into a training set and a test set, with 5% of the data going to the test set\n",
|
| 181 |
"ds = ds[\"train\"].train_test_split(.05)\n",
|