Fonction torch.t de PyTorch
Manuel de référence Pytorch torch
torch.test une fonction de PyTorch utilisée pour transposer des tenseurs bidimensionnels.
Définition de fonction
torch.t(input)
Exemple d'utilisation
Exemple
import torch
x = torch.randn(3, 4)
y = torch.t(x)
print("Forme d'origine :", x.shape)
print("Transposé :", y.shape)
x = torch.randn(3, 4)
y = torch.t(x)
print("Forme d'origine :", x.shape)
print("Transposé :", y.shape)
Autres extensions