()
| 114 | |
| 115 | |
| 116 | def test_variance(): |
| 117 | @R.function |
| 118 | def foo(x: R.Tensor((1, 2, 3, 4), "float32")) -> R.Tensor((1,), "float32"): |
| 119 | gv: R.Tensor((1,), "float32") = R.variance(x, axis=[-1, -2, -3]) |
| 120 | return gv |
| 121 | |
| 122 | x = relax.Var("x", R.Tensor((1, 2, 3, 4), "float32")) |
| 123 | bb = relax.BlockBuilder() |
| 124 | with bb.function("foo", [x]): |
| 125 | gv = bb.emit(relax.op.variance(x, axis=[-1, -2, -3])) |
| 126 | bb.emit_func_output(gv) |
| 127 | |
| 128 | _check(foo, bb.get()["foo"]) |
| 129 | |
| 130 | |
| 131 | def test_max(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…