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
18eaad17
Unverified
Commit
18eaad17
authored
Jun 16, 2021
by
Hengrui Zhang
Committed by
GitHub
Jun 16, 2021
Browse files
fix bugs (#3008)
Co-authored-by:
zhjwy9343
<
6593865@qq.com
>
parent
36c6c649
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
examples/pytorch/mvgrl/README.md
examples/pytorch/mvgrl/README.md
+1
-0
examples/pytorch/mvgrl/node/main.py
examples/pytorch/mvgrl/node/main.py
+1
-1
examples/pytorch/mvgrl/node/main_sample.py
examples/pytorch/mvgrl/node/main_sample.py
+3
-2
No files found.
examples/pytorch/mvgrl/README.md
View file @
18eaad17
...
...
@@ -68,6 +68,7 @@ This example was implemented by [Hengrui Zhang](https://github.com/hengruizhang9
--wd2 float Weight decay of linear classifier. Default is 0.0.
--epsilon float Edge mask threshold. Default is 0.01.
--hid_dim int Embedding dimension. Default is 512.
--sample_size int Subgraph size. Default is 2000.
```
## How to run examples
...
...
examples/pytorch/mvgrl/node/main.py
View file @
18eaad17
examples/pytorch/mvgrl/node/main_sample.py
View file @
18eaad17
...
...
@@ -23,6 +23,7 @@ parser.add_argument('--wd1', type=float, default=0., help='Weight decay of mvgrl
parser
.
add_argument
(
'--wd2'
,
type
=
float
,
default
=
0.
,
help
=
'Weight decay of linear evaluator.'
)
parser
.
add_argument
(
'--epsilon'
,
type
=
float
,
default
=
0.01
,
help
=
'Edge mask threshold of diffusion graph.'
)
parser
.
add_argument
(
"--hid_dim"
,
type
=
int
,
default
=
512
,
help
=
'Hidden layer dim.'
)
parser
.
add_argument
(
"--sample_size"
,
type
=
int
,
default
=
2000
,
help
=
'Subgraph size.'
)
args
=
parser
.
parse_args
()
...
...
@@ -54,7 +55,7 @@ if __name__ == '__main__':
n_node
=
graph
.
number_of_nodes
()
sample_size
=
2000
sample_size
=
args
.
sample_size
lbl1
=
th
.
ones
(
sample_size
*
2
)
lbl2
=
th
.
zeros
(
sample_size
*
2
)
...
...
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