Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Stephan Seitz
pystencil_reco
Commits
cae9de91
Commit
cae9de91
authored
Feb 28, 2020
by
Stephan Seitz
Browse files
Add simple test to super resolution
parent
ac2b1266
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/test_superresolution.py
View file @
cae9de91
...
...
@@ -16,6 +16,7 @@ import sympy
import
pystencils
import
pystencils_reco.transforms
from
pystencils_reco
import
crazy
from
pystencils_reco.filters
import
gauss_filter
from
pystencils_reco.resampling
import
(
downsample
,
resample
,
resample_to_shape
,
scale_transform
,
translate
)
...
...
@@ -39,6 +40,25 @@ def test_superresolution():
pyconrad
.
show_everything
()
def
test_torch_simple
():
import
pytest
pytest
.
importorskip
(
"torch"
)
import
torch
x
,
y
=
torch
.
zeros
((
20
,
20
)),
torch
.
zeros
((
20
,
20
))
a
=
sympy
.
Symbol
(
'a'
)
@
crazy
def
move
(
x
,
y
,
a
):
return
{
y
.
center
:
x
.
interpolated_access
((
pystencils
.
x_
,
pystencils
.
y_
+
a
))
}
kernel
=
move
(
x
,
y
,
a
).
compile
()
pystencils
.
autodiff
.
show_code
(
kernel
.
ast
)
def
test_downsample
():
shape
=
(
20
,
10
)
...
...
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