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
56b6a4eb
Unverified
Commit
56b6a4eb
authored
Jan 23, 2024
by
Ramon Zhou
Committed by
GitHub
Jan 23, 2024
Browse files
[GraphBolt] Update GB node classification example learning rate (#7000)
parent
8da604d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
examples/sampling/graphbolt/node_classification.py
examples/sampling/graphbolt/node_classification.py
+4
-2
No files found.
examples/sampling/graphbolt/node_classification.py
View file @
56b6a4eb
...
@@ -287,7 +287,9 @@ def evaluate(args, model, graph, features, itemset, num_classes):
...
@@ -287,7 +287,9 @@ def evaluate(args, model, graph, features, itemset, num_classes):
def
train
(
args
,
graph
,
features
,
train_set
,
valid_set
,
num_classes
,
model
):
def
train
(
args
,
graph
,
features
,
train_set
,
valid_set
,
num_classes
,
model
):
optimizer
=
torch
.
optim
.
Adam
(
model
.
parameters
(),
lr
=
args
.
lr
)
optimizer
=
torch
.
optim
.
Adam
(
model
.
parameters
(),
lr
=
args
.
lr
,
weight_decay
=
5e-4
)
dataloader
=
create_dataloader
(
dataloader
=
create_dataloader
(
graph
=
graph
,
graph
=
graph
,
features
=
features
,
features
=
features
,
...
@@ -343,7 +345,7 @@ def parse_args():
...
@@ -343,7 +345,7 @@ def parse_args():
parser
.
add_argument
(
parser
.
add_argument
(
"--lr"
,
"--lr"
,
type
=
float
,
type
=
float
,
default
=
0.0005
,
default
=
1e-3
,
help
=
"Learning rate for optimization."
,
help
=
"Learning rate for optimization."
,
)
)
parser
.
add_argument
(
parser
.
add_argument
(
...
...
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