-
Notifications
You must be signed in to change notification settings - Fork 2
Layer : Transpose
yaitaissa edited this page Aug 30, 2024
·
3 revisions
The Transpose layer performs the transposition of the input tensor according to the attributs.
-
Ttensor of size$(N,C_T,H_T,W_T)$
-
perm(list[int]): indicate how to permute the dimension. Its length must be equal to the rank ofT(4).
-
Ytensor of size$(N,C_Y,H_Y,W_Y)$
- indice
$indice_Y=(z_Y,x_Y, y_Y)$ of the output tensor - Find the coordinate in the input tensor :
$(z_T,x_T,y_T) = (indice_Y[perm[1]],indice_Y[perm[2]],indice_Y[perm[3]])$ - Take the corresponding value:
$Y(z_Y,x_Y, y_Y) = T(z_T,x_T,y_T)$