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
6fd0ce97
Commit
6fd0ce97
authored
Apr 28, 2018
by
rusty1s
Browse files
0.4.0 update
parent
5923606b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
README.md
README.md
+7
-7
No files found.
README.md
View file @
6fd0ce97
...
@@ -79,14 +79,14 @@ The kernel function is defined over the weighted B-spline tensor product basis,
...
@@ -79,14 +79,14 @@ The kernel function is defined over the weighted B-spline tensor product basis,
import
torch
import
torch
from
torch_spline_conv
import
SplineConv
from
torch_spline_conv
import
SplineConv
src
=
torch
.
Tensor
(
4
,
2
)
# 4 nodes with 2 features each
src
=
torch
.
rand
((
4
,
2
),
dtype
=
torch
.
float
)
# 4 nodes with 2 features each
edge_index
=
torch
.
LongT
ensor
([[
0
,
1
,
1
,
2
,
2
,
3
],
[
1
,
0
,
2
,
1
,
3
,
2
]])
# 6 edges
edge_index
=
torch
.
t
ensor
([[
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
.
rand
((
6
,
2
),
dtype
=
torch
.
float
)
# two-dimensional edge attributes
weight
=
torch
.
Tensor
(
25
,
2
,
4
)
# 25 trainable parameters for in_channels x out_channels
weight
=
torch
.
rand
(
(
25
,
2
,
4
)
,
dtype
=
torch
.
float
)
# 25 trainable parameters for in_channels x out_channels
kernel_size
=
torch
.
LongT
ensor
([
5
,
5
])
# 5 trainable parameters in each edge dimension
kernel_size
=
torch
.
t
ensor
([
5
,
5
])
# 5 trainable parameters in each edge dimension
is_open_spline
=
torch
.
ByteT
ensor
([
1
,
1
])
# only use open B-splines
is_open_spline
=
torch
.
t
ensor
([
1
,
1
]
,
dtype
=
torch
.
uint8
)
# 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
)
# separately weight root nodes
root_weight
=
torch
.
rand
((
2
,
4
),
dtype
=
torch
.
float
)
# separately weight root nodes
bias
=
None
# do not apply an additional bias
bias
=
None
# do not apply an additional bias
out
=
SplineConv
.
apply
(
src
,
edge_index
,
pseudo
,
weight
,
kernel_size
,
out
=
SplineConv
.
apply
(
src
,
edge_index
,
pseudo
,
weight
,
kernel_size
,
...
...
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