yezqNLP opened a new issue #18345:
URL: https://github.com/apache/incubator-mxnet/issues/18345


   When I use the following code, which cannot be hybridized as code `height, 
width = x.shape[2:]` which reported error that `AttributeError: 'Symbol' object 
has no attribute 'shape'`. 
   How can I change this code to hybridize?
   
   ```
       height, width = x.shape[2:]
       oh = math.ceil(height / strides)
       ow = math.ceil(width / strides)
       pad_h = max((oh - 1) * strides + (kernel_size - 1) * dilation + 1 - 
height, 0)
       pad_w = max((ow - 1) * strides + (kernel_size - 1) * dilation + 1 - 
width, 0)
       return 0, 0, 0, 0, pad_h // 2, pad_h - pad_h // 2, pad_w // 2, pad_w - 
pad_w // 2
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to