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
0a60df35
Commit
0a60df35
authored
Jul 20, 2020
by
rusty1s
Browse files
fix getting values of a PyTorch sparse tensor
parent
4bd6aa8f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
torch_sparse/tensor.py
torch_sparse/tensor.py
+1
-1
No files found.
torch_sparse/tensor.py
View file @
0a60df35
...
@@ -66,7 +66,7 @@ class SparseTensor(object):
...
@@ -66,7 +66,7 @@ class SparseTensor(object):
value
:
Optional
[
torch
.
Tensor
]
=
None
value
:
Optional
[
torch
.
Tensor
]
=
None
if
has_value
:
if
has_value
:
value
=
mat
.
_
values
()
value
=
mat
.
values
()
return
SparseTensor
(
row
=
row
,
rowptr
=
None
,
col
=
col
,
value
=
value
,
return
SparseTensor
(
row
=
row
,
rowptr
=
None
,
col
=
col
,
value
=
value
,
sparse_sizes
=
(
mat
.
size
(
0
),
mat
.
size
(
1
)),
sparse_sizes
=
(
mat
.
size
(
0
),
mat
.
size
(
1
)),
...
...
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