Do programmers consider to add "shape" property for MXNET symbol?

Do programmers consider to add “shape” property for MXNET symbol?

When writing custom symbol operation, what’s the function “infer_shape”? It is a little trouble.

Any advice will be appreciated, thanks.

Let’s say you declared symbol s1 and s2 (without providing shapes for both). Now you create s3 = s1 + s2. Then we can use infer_shape to just check what would be the shape of s3 if shape of s1 = (1,3) and shape of s2 = (1,3). Ex-
“s3.infer_shape(s1 = (1,3), s2 = (1,3))”.
If you have provided shapes for s1 and s2 while declaring them, then you don’t have to pass any arguments when calling infer shape. Ex- “s3.infer_shape()”.
One thing to note that if you have provided shapes for s1 and s2 (that is (1,3)), then you must have to pass values of s1 and s2 with shape (1, 3) while evaluating s3, like while calling “.bind” function. But if you haven’t provided shapes of s1 and s2 then you can pass values for s1 and s2 of any shapes.

Hope this helps

@hdjsjyl yes there is on-going work on supporting dynamic shapes for operators: https://cwiki.apache.org/confluence/display/MXNET/Dynamic+shape

1 Like

Yes, it helps a lot. Thanks

Good, because I think symbol is more stable than GLuon, so I prefer you continue to develop and optimize symbol. I am looking forward to news. Thank you very much.

1 Like