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
52ed6a45
Commit
52ed6a45
authored
Oct 06, 2018
by
GaiYu0
Browse files
train.py help
parent
8a6d25ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
10 deletions
+20
-10
examples/pytorch/line_graph/train.py
examples/pytorch/line_graph/train.py
+20
-10
No files found.
examples/pytorch/line_graph/train.py
View file @
52ed6a45
...
@@ -15,16 +15,26 @@ import gnn
...
@@ -15,16 +15,26 @@ import gnn
import
utils
import
utils
parser
=
argparse
.
ArgumentParser
()
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
'--batch-size'
,
type
=
int
)
parser
.
add_argument
(
'--batch-size'
,
type
=
int
,
parser
.
add_argument
(
'--gpu'
,
type
=
int
)
help
=
'Batch size'
,
default
=
4
)
parser
.
add_argument
(
'--n-communities'
,
type
=
int
)
parser
.
add_argument
(
'--gpu'
,
type
=
int
,
parser
.
add_argument
(
'--n-features'
,
type
=
int
)
help
=
'GPU'
,
default
=-
1
)
parser
.
add_argument
(
'--n-graphs'
,
type
=
int
)
parser
.
add_argument
(
'--n-communities'
,
type
=
int
,
parser
.
add_argument
(
'--n-iterations'
,
type
=
int
)
help
=
'Number of communities'
,
default
=
2
)
parser
.
add_argument
(
'--n-layers'
,
type
=
int
)
parser
.
add_argument
(
'--n-features'
,
type
=
int
,
parser
.
add_argument
(
'--n-nodes'
,
type
=
int
)
help
=
'Number of features per layer'
,
default
=
2
)
parser
.
add_argument
(
'--model-path'
,
type
=
str
)
parser
.
add_argument
(
'--n-graphs'
,
type
=
int
,
parser
.
add_argument
(
'--radius'
,
type
=
int
)
help
=
'Number of graphs'
,
default
=
6000
)
parser
.
add_argument
(
'--n-iterations'
,
type
=
int
,
help
=
'Number of iterations'
,
default
=
10000
)
parser
.
add_argument
(
'--n-layers'
,
type
=
int
,
help
=
'Number of layers'
,
default
=
30
)
parser
.
add_argument
(
'--n-nodes'
,
type
=
int
,
help
=
'Number of nodes'
,
default
=
1000
)
parser
.
add_argument
(
'--model-path'
,
type
=
str
,
help
=
'Path to the checkpoint of model'
,
default
=
'model'
)
parser
.
add_argument
(
'--radius'
,
type
=
int
,
help
=
'Radius'
,
default
=
3
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
dev
=
th
.
device
(
'cpu'
)
if
args
.
gpu
<
0
else
th
.
device
(
'cuda:%d'
%
args
.
gpu
)
dev
=
th
.
device
(
'cpu'
)
if
args
.
gpu
<
0
else
th
.
device
(
'cuda:%d'
%
args
.
gpu
)
...
...
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