chowkamlee81 commented on issue #7717: Subpixel convolution(state of art) 
implementation rather than using Deconvolution.
URL: 
https://github.com/apache/incubator-mxnet/issues/7717#issuecomment-329748836
 
 
   iam not using any concat layer, below is the code along with jupyter 
notebook producing dimensions.
   **Kindly pls suggest**...Im getting correct result in jupyter notebook but 
when the symbol is given for training, exception thrown
   **Code**
   num_classes = 19
   upscale_factor = 16   #Input (1024,48,64)
   interim_featmap = mx.symbol.Convolution(name='interim_featmap', 
data=relu_fc6, num_filter=upscale_factor*upscale_factor*num_classes, pad=(0,0), 
kernel=(1, 1), stride=(1, 1),no_bias=True) #(N,C*r^2,H,W)
   splitted = mx.symbol.reshape(name='splitted', data=interim_featmap, 
shape=(0, -4, -1, upscale_factor**2, 0, 0))   #(N, C, r^2, H, W)
   unflatten = mx.symbol.reshape(name='unflatten', data=splitted, shape=(0, 0, 
-4, upscale_factor, upscale_factor, 0, 0))  #(N, C, r, r, H, W)
   swapped = mx.symbol.transpose(name='swapped', data=unflatten, axes=(0, 1, 2, 
4, 3, 5)) # (N, C, H, r, W, r)
   upsampling_featmap = mx.symbol.reshape(name='upsampling_featmap', 
data=swapped, shape=(0, 0, -3, -3)) # (N, C, H*r, W*r)
   featmap_score = mx.symbol.Convolution(data=upsampling_featmap, kernel=(1, 
1), pad=(0, 0), stride = (1, 1),num_filter=num_classes, 
name="featmap_score",no_bias = True) #(1,19,768,1024)
   
   croped_score = mx.symbol.Crop(*[featmap_score, data], offset=(8, 8), 
name='croped_score') #(1,19,768,1024)
   softmax = mx.symbol.SoftmaxOutput(data=croped_score, label=seg_cls_gt, 
normalization='valid', multi_output=True,use_ignore=True, ignore_label=255, 
   
   - name="softmax")
   
   
 
----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to