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
torch-sparse
Commits
40a19d20
Commit
40a19d20
authored
Feb 04, 2020
by
rusty1s
Browse files
reasonable default dtype
parent
258dbf0f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
torch_sparse/tensor.py
torch_sparse/tensor.py
+2
-1
No files found.
torch_sparse/tensor.py
View file @
40a19d20
...
...
@@ -292,7 +292,8 @@ class SparseTensor(object):
if
value
is
not
None
:
return
value
else
:
return
torch
.
tensor
(
0.
,
device
=
self
.
storage
.
col
().
device
)
return
torch
.
tensor
(
0.
,
dtype
=
torch
.
float
,
device
=
self
.
storage
.
col
().
device
)
def
device
(
self
):
return
self
.
storage
.
col
().
device
...
...
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