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
e692eff8
Commit
e692eff8
authored
Sep 19, 2022
by
rusty1s
Browse files
remove unused padding function
parent
aeca5cf7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
24 deletions
+0
-24
torch_sparse/__init__.py
torch_sparse/__init__.py
+0
-3
torch_sparse/padding.py
torch_sparse/padding.py
+0
-21
No files found.
torch_sparse/__init__.py
View file @
e692eff8
...
@@ -55,7 +55,6 @@ from .rw import random_walk # noqa
...
@@ -55,7 +55,6 @@ from .rw import random_walk # noqa
from
.metis
import
partition
# noqa
from
.metis
import
partition
# noqa
from
.bandwidth
import
reverse_cuthill_mckee
# noqa
from
.bandwidth
import
reverse_cuthill_mckee
# noqa
from
.saint
import
saint_subgraph
# noqa
from
.saint
import
saint_subgraph
# noqa
from
.padding
import
padded_index
,
padded_index_select
# noqa
from
.sample
import
sample
,
sample_adj
# noqa
from
.sample
import
sample
,
sample_adj
# noqa
from
.convert
import
to_torch_sparse
,
from_torch_sparse
# noqa
from
.convert
import
to_torch_sparse
,
from_torch_sparse
# noqa
...
@@ -101,8 +100,6 @@ __all__ = [
...
@@ -101,8 +100,6 @@ __all__ = [
'partition'
,
'partition'
,
'reverse_cuthill_mckee'
,
'reverse_cuthill_mckee'
,
'saint_subgraph'
,
'saint_subgraph'
,
'padded_index'
,
'padded_index_select'
,
'to_torch_sparse'
,
'to_torch_sparse'
,
'from_torch_sparse'
,
'from_torch_sparse'
,
'to_scipy'
,
'to_scipy'
,
...
...
torch_sparse/padding.py
deleted
100644 → 0
View file @
aeca5cf7
from
typing
import
Tuple
,
List
import
torch
from
torch_sparse.tensor
import
SparseTensor
def
padded_index
(
src
:
SparseTensor
,
binptr
:
torch
.
Tensor
)
->
Tuple
[
torch
.
Tensor
,
torch
.
Tensor
,
torch
.
Tensor
,
torch
.
Tensor
,
List
[
int
],
List
[
int
]]:
return
torch
.
ops
.
torch_sparse
.
padded_index
(
src
.
storage
.
rowptr
(),
src
.
storage
.
col
(),
src
.
storage
.
rowcount
(),
binptr
)
def
padded_index_select
(
src
:
torch
.
Tensor
,
index
:
torch
.
Tensor
,
fill_value
:
float
=
0.
)
->
torch
.
Tensor
:
fill_value
=
torch
.
tensor
(
fill_value
,
dtype
=
src
.
dtype
)
return
torch
.
ops
.
torch_sparse
.
padded_index_select
(
src
,
index
,
fill_value
)
SparseTensor
.
padded_index
=
padded_index
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