()
| 56 | |
| 57 | |
| 58 | def test_argmax(): |
| 59 | @R.function |
| 60 | def foo(x: R.Tensor((1, 2, 3, 4), "float32")) -> R.Tensor((1, 3, 4), "int64"): |
| 61 | gv: R.Tensor((1, 3, 4), "int64") = R.argmax(x, axis=1) |
| 62 | return gv |
| 63 | |
| 64 | x = relax.Var("x", R.Tensor((1, 2, 3, 4), "float32")) |
| 65 | bb = relax.BlockBuilder() |
| 66 | with bb.function("foo", [x]): |
| 67 | gv = bb.emit(relax.op.argmax(x, axis=1)) |
| 68 | bb.emit_func_output(gv) |
| 69 | |
| 70 | _check(foo, bb.get()["foo"]) |
| 71 | |
| 72 | |
| 73 | def test_argmax_without_specified_axis(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…