I'm now writing a custom op, and it's output shape is dynamic, how to define the output_shape in infer_shape function.
Asked
Active
Viewed 94 times
1 Answers
1
The infer_shape
function of CustomOpProp
has an in_shape
parameter. You can use it to calculate the output_shape dynamically.
If you cannot infer input shape without input data, but can infer maximum shape, then you can use it as commented here: https://github.com/apache/incubator-mxnet/issues/9758

Sergei
- 1,617
- 15
- 31