| 50 | |
| 51 | |
| 52 | def test_resize3d(): |
| 53 | @R.function |
| 54 | def foo(x: R.Tensor((2, 3, 8, 8, 8), "float32")) -> R.Tensor((2, 3, 4, 6, 7), "float32"): |
| 55 | gv: R.Tensor((2, 3, 4, 6, 7), "float32") = R.image.resize3d( |
| 56 | x, size=(4, 6, 7), layout="NCDHW" |
| 57 | ) |
| 58 | return gv |
| 59 | |
| 60 | bb = relax.BlockBuilder() |
| 61 | x = relax.Var("x", R.Tensor((2, 3, 8, 8, 8), "float32")) |
| 62 | with bb.function("foo", [x]): |
| 63 | gv = bb.emit(relax.op.image.resize3d(x, (4, 6, 7), layout="NCDHW")) |
| 64 | bb.emit_func_output(gv) |
| 65 | |
| 66 | _check(foo, bb.get()["foo"]) |
| 67 | |
| 68 | |
| 69 | if __name__ == "__main__": |