Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

pytorch transpose

>>> x = torch.randn(2, 3)
>>> x
tensor([[ 1.0028, -0.9893,  0.5809],
        [-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 :: shape pandas 
Python :: how to bulk update in mongodb using python 
Python :: fasttext python 
Python :: fillna method 
Python :: python sort multiple lists based on sorting of single list 
Python :: How to join two dataframes by 2 columns so they have only the common rows? 
Python :: python print with 2 decimals 
Python :: float infinity python 
Python :: python cocktail sort 
Python :: discord py check if user has permission return message if not 
Python :: check regex in python 
Python :: python turtle triangle 
Python :: number of days in a month python 
Python :: python 3.7 download for windows 7 32-bit 
Python :: python pillow cut image in half 
Python :: sqlalchemy filter between dates 
Python :: find all subsequences of a list python 
Python :: merge dicts python 
Python :: how to remove none in python 
Python :: python array usage 
Python :: tty escape 
Python :: sort rows by values dataframe 
Python :: edit pandas row value 
Python :: python while true loop 
Python :: Exit code: ENOENT. spawn /usr/bin/python ENOENT 
Python :: gspread_pandas pypi 
Python :: group multiple columns in pandas 
Python :: dataframe to tf data 
Python :: python cli click 
Python :: loop through words in a string python 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =