MCPcopy Create free account
hub / github.com/apache/tvm / test_resize2d

Function test_resize2d

tests/python/relax/test_tvmscript_parser_op_image.py:37–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35
36
37def test_resize2d():
38 @R.function
39 def foo(x: R.Tensor((2, 14, 14, 3), "float32")) -> R.Tensor((2, 28, 28, 3), "float32"):
40 gv: R.Tensor((2, 28, 28, 3), "float32") = R.image.resize2d(x, size=(28, 28), layout="NHWC")
41 return gv
42
43 bb = relax.BlockBuilder()
44 x = relax.Var("x", R.Tensor((2, 14, 14, 3), "float32"))
45 with bb.function("foo", [x]):
46 gv = bb.emit(relax.op.image.resize2d(x, (28, 28), layout="NHWC"))
47 bb.emit_func_output(gv)
48
49 _check(foo, bb.get()["foo"])
50
51
52def test_resize3d():

Callers

nothing calls this directly

Calls 7

functionMethod · 0.95
emitMethod · 0.95
emit_func_outputMethod · 0.95
getMethod · 0.95
TensorMethod · 0.80
resize2dMethod · 0.80
_checkFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…