PyTorch torch.t Funktion
PyTorch torch Referenzhandbuch
torch.tist eine Funktion in PyTorch, die zum Transponieren zweidimensionaler Tensoren verwendet wird.
Funktionsdefinition
torch.t(input)
Anwendungsbeispiel
Beispiel
import torch
x = torch.randn(3, 4)
y = torch.t(x)
print("Ursprüngliche Form:", x.shape)
print("Transponiert:", y.shape)
x = torch.randn(3, 4)
y = torch.t(x)
print("Ursprüngliche Form:", x.shape)
print("Transponiert:", y.shape)
Andere Erweiterungen