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 2020/03/31 08:10:00 UTC

[GitHub] [incubator-mxnet] John1231983 opened a new issue #17944: How to split symbol?

John1231983 opened a new issue #17944: How to split symbol?
URL: https://github.com/apache/incubator-mxnet/issues/17944
 
 
   I have a symbol that is created by concat between `data`  and `seg` at `dim=1`
   ```
   data with shape of 64x3x224x224
   seg with shpe of 64x1x224x224
   ```
   Hence, the symbol has size of `64x4x224x224`. I want to split the symbol back to data and seg. How can I do it? This is what I did
   ```
   data_seg  = mx.symbol.split(data=data_seg, axis=1, num_outputs=2)
   data = data_seg [0]
   seg =  data_seg [1]
   ```
   However, the shape of data and seg result in `64x2x224x224` instead of `64x3x224x224` and `64x1x224x224`, respectively.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] lilongyue commented on issue #17944: How to split symbol?

Posted by GitBox <gi...@apache.org>.
lilongyue commented on issue #17944: How to split symbol?
URL: https://github.com/apache/incubator-mxnet/issues/17944#issuecomment-606506860
 
 
   you can use 'split_v2' function to solve this ! below is a ndarray version to your case.
   symbolic operator should be the same 
   
   ##########################
   import mxnet.ndarray as nd
   
   input=nd.random.uniform(shape=[64,4,224,224])
   
   output=input.split_v2((3,4),1)
   
   print(input.shape)
   print('------')
   print(output[0].shape)
   print(output[1].shape)

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] John1231983 commented on issue #17944: How to split symbol?

Posted by GitBox <gi...@apache.org>.
John1231983 commented on issue #17944: How to split symbol?
URL: https://github.com/apache/incubator-mxnet/issues/17944#issuecomment-607029117
 
 
   @lilongyue it does not work for symbol.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] shuokay commented on issue #17944: How to split symbol?

Posted by GitBox <gi...@apache.org>.
shuokay commented on issue #17944: How to split symbol?
URL: https://github.com/apache/incubator-mxnet/issues/17944#issuecomment-610693985
 
 
   I think `mx.sym.slice` is what you need.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] John1231983 commented on issue #17944: How to split symbol?

Posted by GitBox <gi...@apache.org>.
John1231983 commented on issue #17944: How to split symbol?
URL: https://github.com/apache/incubator-mxnet/issues/17944#issuecomment-606512387
 
 
   Thanks. Please check it because it has some error
   >mxnet.base.MXNetError: [16:36:59] src/operator/tensor/./matrix_op-inl.h:2634: Check failed: start < end: start 4 is not less than end 4for subarray 2 Stack 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services