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
5f9e45d7
Unverified
Commit
5f9e45d7
authored
May 30, 2023
by
gmsft
Committed by
GitHub
May 30, 2023
Browse files
[DOC format]Update 1_introduction.py (#5748)
Co-authored-by:
Mufei Li
<
mufeili1996@gmail.com
>
parent
8a3256d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
tutorials/blitz/1_introduction.py
tutorials/blitz/1_introduction.py
+2
-4
No files found.
tutorials/blitz/1_introduction.py
View file @
5f9e45d7
...
@@ -64,7 +64,7 @@ import torch.nn.functional as F
...
@@ -64,7 +64,7 @@ import torch.nn.functional as F
dataset
=
dgl
.
data
.
CoraGraphDataset
()
dataset
=
dgl
.
data
.
CoraGraphDataset
()
print
(
"Number of categories:
"
,
dataset
.
num_classes
)
print
(
f
"Number of categories:
{
dataset
.
num_classes
}
"
)
######################################################################
######################################################################
...
@@ -185,9 +185,7 @@ def train(g, model):
...
@@ -185,9 +185,7 @@ def train(g, model):
if
e
%
5
==
0
:
if
e
%
5
==
0
:
print
(
print
(
"In epoch {}, loss: {:.3f}, val acc: {:.3f} (best {:.3f}), test acc: {:.3f} (best {:.3f})"
.
format
(
f
"In epoch
{
e
}
, loss:
{
loss
:.
3
f
}
, val acc:
{
val_acc
:.
3
f
}
(best
{
best_val_acc
:.
3
f
}
), test acc:
{
test_acc
:.
3
f
}
(best
{
best_test_acc
:.
3
f
}
)"
e
,
loss
,
val_acc
,
best_val_acc
,
test_acc
,
best_test_acc
)
)
)
...
...
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