Hi @Evans, the error seems to say the relay.reshape op returns a tensor with a dynamic shape, and Relay does not support symbolic shape memory planning.
The community is developing Relax (Relay Next), which has first-class symbolic shape support. Feel free to check out our pre-RFC and repo.
This is because you used relay.shape_of(x). shape_of doesn’t try to tell if the input shape is static or not, so the output of shape_of is always an unknown shape (?, ?). If you replace that with [1, 2] it works.