You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/01/09 08:53:53 UTC

[GitHub] KeyKy commented on issue #9337: Questions about the accnn.py tools.

KeyKy commented on issue #9337: Questions about the accnn.py tools.
URL: https://github.com/apache/incubator-mxnet/issues/9337#issuecomment-356219641
 
 
   1. I found the accnn.py can't apply to Convolution with stride 2. This following code should be added
   ```
     def sym_handle(data, node):
       kernel = eval(node['param']['kernel'])
       pad = eval(node['param']['pad'])
       name = node['name']
   
       name1 = name + '_v'
       kernel1 = tuple((kernel[0], 1))
       pad1 = tuple((pad[0], 0))
       stride2 = tuple((stride[0], 1))
       num_filter = W1.shape[0]
       sym1 = mx.symbol.Convolution(data=data, kernel=kernel1, pad=pad1, num_filter=num_filter, name=name1)
   
       name2 = name + '_h'
       kernel2 = tuple((1, kernel[1]))
       pad2 = tuple((0, pad[1]))
       stride2 = tuple((1, stride[1]))
       num_filter = W2.shape[0]
       sym2 = mx.symbol.Convolution(data=sym1, kernel=kernel2, pad=pad2, num_filter=num_filter, name=name2)
       return sym2
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services