Should there be a matrix check in ggml_transpose
?
#757
-
I apologize in advance for any mistakes in understanding I may have! Still very new to tensors and ML frameworks. Based on my understanding,
Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
ggml_tranpose
swaps the first two dimensions of the tensor. That is usually fine even if the tensor has a higher dimension than 2, since the other dimensions are usually the batch size. So what you end with is a batch of transposed matrices, which is generally what you want. As you say,ggml_permute
can be used for more advanced transposes that apply to any dimensions.