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
69cab8ac
"vscode:/vscode.git/clone" did not exist on "e5902ed11a024036fa6fd1e858b48117cc92d5f5"
Commit
69cab8ac
authored
Jan 13, 2020
by
rusty1s
Browse files
typo
parent
301ecec5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
11 deletions
+6
-11
torch_sparse/cat.py
torch_sparse/cat.py
+6
-11
No files found.
torch_sparse/cat.py
View file @
69cab8ac
...
...
@@ -58,7 +58,7 @@ def cat(tensors, dim):
if
has_colcount
:
colcounts
+=
[
tensor
.
storage
.
colcount
]
if
has
colptr
:
if
has
_
colptr
:
colptr
=
tensor
.
storage
.
colptr
colptr
=
colptr
if
len
(
colptrs
)
==
0
else
colptr
[
1
:]
colptrs
+=
[
colptr
+
nnzs
]
...
...
@@ -125,16 +125,11 @@ def cat(tensors, dim):
old_storage
=
tensors
[
0
].
storage
storage
=
old_storage
.
storage
.
__class__
(
tensors
[
0
].
storage
.
index
,
value
=
torch
.
cat
(
values
,
dim
=
dim
-
1
),
sparse_size
=
sparse_size
,
rowcount
=
old_storage
.
_rowcount
,
rowptr
=
old_storage
.
_rowcount
,
colcount
=
old_storage
.
_rowcount
,
colptr
=
old_storage
.
_rowcount
,
csr2csc
=
old_storage
.
_csr2csc
,
csc2csr
=
old_storage
.
_csc2csr
,
is_sorted
=
True
)
tensors
[
0
].
storage
.
index
,
value
=
torch
.
cat
(
values
,
dim
=
dim
-
1
),
sparse_size
=
sparse_size
,
rowcount
=
old_storage
.
_rowcount
,
rowptr
=
old_storage
.
_rowcount
,
colcount
=
old_storage
.
_rowcount
,
colptr
=
old_storage
.
_rowcount
,
csr2csc
=
old_storage
.
_csr2csc
,
csc2csr
=
old_storage
.
_csc2csr
,
is_sorted
=
True
)
else
:
raise
IndexError
(
...
...
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