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-spline-conv
Commits
b4d95df1
Unverified
Commit
b4d95df1
authored
Nov 23, 2018
by
Matthias Fey
Committed by
GitHub
Nov 23, 2018
Browse files
Merge pull request #3 from AntoinePrv/cuda_no_cuda
Cuda no cuda
parents
31fc84ff
db0360a0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
setup.py
setup.py
+2
-2
torch_spline_conv/conv.py
torch_spline_conv/conv.py
+1
-1
No files found.
setup.py
View file @
b4d95df1
from
setuptools
import
setup
,
find_packages
from
setuptools
import
setup
,
find_packages
import
torch
import
torch
from
torch.utils.cpp_extension
import
CppExtension
,
CUDAExtension
from
torch.utils.cpp_extension
import
CppExtension
,
CUDAExtension
,
CUDA_HOME
ext_modules
=
[
ext_modules
=
[
CppExtension
(
'basis_cpu'
,
[
'cpu/basis.cpp'
]),
CppExtension
(
'basis_cpu'
,
[
'cpu/basis.cpp'
]),
...
@@ -8,7 +8,7 @@ ext_modules = [
...
@@ -8,7 +8,7 @@ ext_modules = [
]
]
cmdclass
=
{
'build_ext'
:
torch
.
utils
.
cpp_extension
.
BuildExtension
}
cmdclass
=
{
'build_ext'
:
torch
.
utils
.
cpp_extension
.
BuildExtension
}
if
torch
.
cuda
.
is_available
()
:
if
CUDA_HOME
is
not
None
:
ext_modules
+=
[
ext_modules
+=
[
CUDAExtension
(
'basis_cuda'
,
CUDAExtension
(
'basis_cuda'
,
[
'cuda/basis.cpp'
,
'cuda/basis_kernel.cu'
]),
[
'cuda/basis.cpp'
,
'cuda/basis_kernel.cu'
]),
...
...
torch_spline_conv/conv.py
View file @
b4d95df1
...
@@ -7,7 +7,7 @@ from .utils.degree import degree as node_degree
...
@@ -7,7 +7,7 @@ from .utils.degree import degree as node_degree
class
SplineConv
(
object
):
class
SplineConv
(
object
):
"""Applies the spline-based convolution operator :math:`(f \star g)(i) =
r
"""Applies the spline-based convolution operator :math:`(f \star g)(i) =
\frac{1}{|\mathcal{N}(i)|} \sum_{l=1}^{M_{in}} \sum_{j \in \mathcal{N}(i)}
\frac{1}{|\mathcal{N}(i)|} \sum_{l=1}^{M_{in}} \sum_{j \in \mathcal{N}(i)}
f_l(j) \cdot g_l(u(i, j))` over several node features of an input graph.
f_l(j) \cdot g_l(u(i, j))` over several node features of an input graph.
The kernel function :math:`g_l` is defined over the weighted B-spline
The kernel function :math:`g_l` is defined over the weighted B-spline
...
...
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