I would like to know, how can I copy this variable and make a new variable with size 512*7*7. Actually the dimension 0 is the number of copy from my original tensor var. This is a line of code which I would like to use it in the forward function of my customized new layer. Like other layers which are differentialbe, I would like to benefit autograd for doing backprop on it. So unpacking this variable and converting it to numpy tensor and doing this operation in numpy area is not correct according to the philosophy of Autograd.
Are there any good approaches for doing above operation?