Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
f6bc4e4b
"git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "5afc2b60cd1c555c33e2df7caa93372b5c21a3e8"
Unverified
Commit
f6bc4e4b
authored
Nov 24, 2023
by
Rhett Ying
Committed by
GitHub
Nov 24, 2023
Browse files
[doc] do not save model in tutorial (#6614)
parent
0a8c533a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
8 deletions
+2
-8
notebooks/stochastic_training/node_classification.ipynb
notebooks/stochastic_training/node_classification.ipynb
+2
-8
No files found.
notebooks/stochastic_training/node_classification.ipynb
View file @
f6bc4e4b
...
...
@@ -4,8 +4,7 @@
"metadata": {
"colab": {
"private_outputs": true,
"provenance": [],
"authorship_tag": "ABX9TyMWE8zjXNzesRPRk8RK7jsv"
"provenance": []
},
"kernelspec": {
"name": "python3",
...
...
@@ -313,8 +312,6 @@
"source": [
"import tqdm\n",
"\n",
"best_accuracy = 0\n",
"best_model_path = \"model.pt\"\n",
"for epoch in range(10):\n",
" model.train()\n",
"\n",
...
...
@@ -353,9 +350,6 @@
" labels = np.concatenate(labels)\n",
" accuracy = sklearn.metrics.accuracy_score(labels, predictions)\n",
" print(\"Epoch {} Validation Accuracy {}\".format(epoch, accuracy))\n",
" if best_accuracy < accuracy:\n",
" best_accuracy = accuracy\n",
" torch.save(model.state_dict(), best_model_path)\n",
"\n",
" # Note that this tutorial do not train the whole model to the end.\n",
" break"
...
...
@@ -378,4 +372,4 @@
}
}
]
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment