()
| 86 | |
| 87 | |
| 88 | def test_argmax_keep_dims(): |
| 89 | @R.function |
| 90 | def foo(x: R.Tensor((1, 2, 3, 4), "float32")) -> R.Tensor((1, 1, 3, 4), "int64"): |
| 91 | gv: R.Tensor((1, 1, 3, 4), "int64") = R.argmax(x, axis=1, keepdims=True) |
| 92 | return gv |
| 93 | |
| 94 | x = relax.Var("x", R.Tensor((1, 2, 3, 4), "float32")) |
| 95 | bb = relax.BlockBuilder() |
| 96 | with bb.function("foo", [x]): |
| 97 | gv = bb.emit(relax.op.argmax(x, axis=1, keepdims=True)) |
| 98 | bb.emit_func_output(gv) |
| 99 | |
| 100 | _check(foo, bb.get()["foo"]) |
| 101 | |
| 102 | |
| 103 | if __name__ == "__main__": |
nothing calls this directly
no test coverage detected
searching dependent graphs…