Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

transverse tensor in pytorch

torch.transpose(input, dim0, dim1) 
#input (Tensor) – the input tensor.
#dim0 (int) – the first dimension to be transposed
#dim1 (int) – the second dimension to be transposed
ex:-
>>> x = torch.randn(2, 3)
>>> x
		#dimention 1
tensor([[ 1.0028, -0.9893,  0.5809], # dimension 2
        [-0.1669,  0.7299,  0.4942]])
>>> torch.transpose(x, 0, 1)
tensor([[ 1.0028, -0.1669],
        [-0.9893,  0.7299],
        [ 0.5809,  0.4942]])
Comment

PREVIOUS NEXT
Code Example
Python :: list the contents of a package python 
Python :: django queryset with multiple contain keyword 
Python :: Python - Comment jouer le fichier Mp3 
Python :: text files to words generator 
Python :: 201903100110041 
Python :: print dataframe row horizontally 
Python :: longueur liste python 
Python :: membuat chat bot dengan python 
Python :: how to start a working to run a particular queue 
Python :: pep8 E302 
Python :: how to use python-socker.io with fast api 
Python :: num1=int(self.t1.get()) 
Python :: what does it mean when i get a permission error in python 
Python :: how to reverse a dictionary in python 
Python :: how to search over a notebook in python 
Python :: django query or condition for query parameters 
Python :: loading kivy lang 
Python :: cannot access modules from neighbouring directories jupyter notebook 
Python :: read file in python 
Python :: pytho ntoday as string 
Python :: python namedtuple typename 
Python :: python error catching of modules 
Python :: fromhex python 2.7 
Python :: python filter dictionary 
Python :: python pipe where 
Python :: initiate dask 
Python :: create a distance matrix from a coordinate matrix in python 
Python :: np where pandas with 3 choices 
Python :: matplotlib annotate align center 
Python :: upper python 
ADD CONTENT
Topic
Content
Source link
Name
1+6 =