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
b189dba7
"tests/vscode:/vscode.git/clone" did not exist on "9dedc44555876584df0c77ea08f3c2f224b02aa5"
Commit
b189dba7
authored
Mar 23, 2018
by
rusty1s
Browse files
py2.7 fix
parent
af9d775b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
test/test_basis.py
test/test_basis.py
+2
-2
test/test_spline_conv.py
test/test_spline_conv.py
+2
-2
No files found.
test/test_basis.py
View file @
b189dba7
...
...
@@ -26,7 +26,7 @@ def test_spline_basis_cpu(tensor, i):
basis
,
index
=
spline_basis_forward
(
degree
,
pseudo
,
kernel_size
,
is_open_spline
,
K
)
basis
=
[
pytest
.
approx
(
x
,
0.01
)
for
x
in
basis
.
view
(
-
1
).
tolist
()]
basis
=
[
pytest
.
approx
(
b
,
0.01
)
for
b
in
basis
.
view
(
-
1
).
tolist
()]
assert
basis
==
expected_basis
.
view
(
-
1
).
tolist
()
assert
index
.
tolist
()
==
expected_index
.
tolist
()
...
...
@@ -47,7 +47,7 @@ def test_spline_basis_gpu(tensor, i):
basis
,
index
=
spline_basis_forward
(
degree
,
pseudo
,
kernel_size
,
is_open_spline
,
K
)
basis
,
index
=
basis
.
cpu
(),
index
.
cpu
()
basis
=
[
pytest
.
approx
(
x
,
0.01
)
for
x
in
basis
.
view
(
-
1
).
tolist
()]
basis
=
[
pytest
.
approx
(
b
,
0.01
)
for
b
in
basis
.
view
(
-
1
).
tolist
()]
assert
basis
==
expected_basis
.
view
(
-
1
).
tolist
()
assert
index
.
tolist
()
==
expected_index
.
tolist
()
test/test_spline_conv.py
View file @
b189dba7
...
...
@@ -38,7 +38,7 @@ def test_spline_conv_cpu(tensor):
1
+
12.5
*
7
+
13
*
8
,
]
output
=
[
pytest
.
approx
(
x
,
0.01
)
for
x
in
output
.
view
(
-
1
).
tolist
()]
output
=
[
pytest
.
approx
(
o
,
0.01
)
for
o
in
output
.
view
(
-
1
).
tolist
()]
assert
output
==
expected_output
x
,
weight
,
pseudo
=
Variable
(
x
),
Variable
(
weight
),
Variable
(
pseudo
)
...
...
@@ -47,7 +47,7 @@ def test_spline_conv_cpu(tensor):
output
=
spline_conv
(
x
,
edge_index
,
pseudo
,
weight
,
kernel_size
,
is_open_spline
,
1
,
root_weight
,
bias
)
output
=
[
pytest
.
approx
(
x
,
0.01
)
for
x
in
output
.
data
.
view
(
-
1
).
tolist
()]
output
=
[
pytest
.
approx
(
o
,
0.01
)
for
o
in
output
.
data
.
view
(
-
1
).
tolist
()]
assert
output
==
expected_output
...
...
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