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
c057dcd7
Commit
c057dcd7
authored
Apr 12, 2018
by
rusty1s
Browse files
typo
parent
9ea57e71
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
README.md
README.md
+3
-3
No files found.
README.md
View file @
c057dcd7
...
@@ -68,21 +68,21 @@ The kernel function *g* is defined over the weighted B-spline tensor product bas
...
@@ -68,21 +68,21 @@ The kernel function *g* is defined over the weighted B-spline tensor product bas
import
torch
import
torch
from
torch_spline_conv
import
spline_conv
from
torch_spline_conv
import
spline_conv
src
=
torch
.
Tensor
(
4
,
2
)
# 4 nodes with 2 features
src
=
torch
.
Tensor
(
4
,
2
)
# 4 nodes with 2 features
each
edge_index
=
torch
.
LongTensor
([[
0
,
1
,
1
,
2
,
2
,
3
],
[
1
,
0
,
2
,
1
,
3
,
2
]])
# 6 edges
edge_index
=
torch
.
LongTensor
([[
0
,
1
,
1
,
2
,
2
,
3
],
[
1
,
0
,
2
,
1
,
3
,
2
]])
# 6 edges
pseudo
=
torch
.
Tensor
(
6
,
2
)
# two-dimensional edge attributes
pseudo
=
torch
.
Tensor
(
6
,
2
)
# two-dimensional edge attributes
weight
=
torch
.
Tensor
(
25
,
2
,
4
)
# 25 trainable parameters for each in_channels x out_channels combination
weight
=
torch
.
Tensor
(
25
,
2
,
4
)
# 25 trainable parameters for each in_channels x out_channels combination
kernel_size
=
torch
.
LongTensor
([
5
,
5
])
# 5 trainable parameters in each edge dimension
kernel_size
=
torch
.
LongTensor
([
5
,
5
])
# 5 trainable parameters in each edge dimension
is_open_spline
=
torch
.
ByteTensor
([
1
,
1
])
# only use open B-splines
is_open_spline
=
torch
.
ByteTensor
([
1
,
1
])
# only use open B-splines
degree
=
1
# B-spline degree of 1
degree
=
1
# B-spline degree of 1
root_weight
=
torch
.
Tensor
(
2
,
4
)
# Weight root nodes separatly
root_weight
=
torch
.
Tensor
(
2
,
4
)
# Weight root nodes separat
e
ly
bias
=
None
# No additional bias
bias
=
None
# No additional bias
output
=
spline_conv
(
src
,
edge_index
,
pseudo
,
weight
,
kernel_size
,
output
=
spline_conv
(
src
,
edge_index
,
pseudo
,
weight
,
kernel_size
,
is_open_spline
,
degree
,
root_weight
,
bias
)
is_open_spline
,
degree
,
root_weight
,
bias
)
print
(
output
.
size
())
print
(
output
.
size
())
torch
.
Size
([
4
,
4
])
# 4 nodes with 4 features
torch
.
Size
([
4
,
4
])
# 4 nodes with 4 features
each
```
```
## Cite
## Cite
...
...
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