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
pyg_autoscale
Commits
dd911f19
Commit
dd911f19
authored
Jun 09, 2021
by
rusty1s
Browse files
fix dropout
parent
724fce4b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
torch_geometric_autoscale/utils.py
torch_geometric_autoscale/utils.py
+1
-1
No files found.
torch_geometric_autoscale/utils.py
View file @
dd911f19
...
@@ -59,7 +59,7 @@ def gen_masks(y: Tensor, train_per_class: int = 20, val_per_class: int = 30,
...
@@ -59,7 +59,7 @@ def gen_masks(y: Tensor, train_per_class: int = 20, val_per_class: int = 30,
def
dropout
(
adj_t
:
SparseTensor
,
p
:
float
,
training
:
bool
=
True
):
def
dropout
(
adj_t
:
SparseTensor
,
p
:
float
,
training
:
bool
=
True
):
if
not
training
:
if
not
training
or
p
==
0.
:
return
adj_t
return
adj_t
if
adj_t
.
storage
.
value
()
is
not
None
:
if
adj_t
.
storage
.
value
()
is
not
None
:
...
...
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