Commit cae9de91 authored by Stephan Seitz's avatar Stephan Seitz
Browse files

Add simple test to super resolution

parent ac2b1266
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment