Tensor dimension swap

18 views
Skip to first unread message

fireman

unread,
Apr 16, 2017, 4:23:46 PM4/16/17
to torch7
Hi, I have a CNN weights tensor arranged as a 4D array
  
     weight [Output Plane] [Input Plane] [width] [height]

I would like to swap the dimensions so that the 4D array is

    weight [Output Plane] [width] [height] [input Plane]

How can I do it in Torch?

Thanks,

Shuaib Ahmed S

unread,
Apr 17, 2017, 4:13:58 AM4/17/17
to torch7 on behalf of fireman
use permute function

--
You received this message because you are subscribed to the Google Groups "torch7" group.
To unsubscribe from this group and stop receiving emails from it, send an email to torch7+unsubscribe@googlegroups.com.
To post to this group, send email to tor...@googlegroups.com.
Visit this group at https://groups.google.com/group/torch7.
For more options, visit https://groups.google.com/d/optout.

fireman

unread,
Apr 17, 2017, 8:27:04 PM4/17/17
to torch7
Could you show me how? Thank you very much...


On Monday, April 17, 2017 at 1:13:58 AM UTC-7, Shuaib Ahmed S wrote:
use permute function

On Mon, Apr 17, 2017 at 1:53 AM, fireman via torch7 <torch7+APn2wQeW3esQD-dFTzB55wMyBRX8xJbzqz3UhAPNuLWPpnI6ph...@googlegroups.com> wrote:
Hi, I have a CNN weights tensor arranged as a 4D array
  
     weight [Output Plane] [Input Plane] [width] [height]

I would like to swap the dimensions so that the 4D array is

    weight [Output Plane] [width] [height] [input Plane]

How can I do it in Torch?

Thanks,

--
You received this message because you are subscribed to the Google Groups "torch7" group.
To unsubscribe from this group and stop receiving emails from it, send an email to torch7+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages