Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

pytorch tensor change dimension order

a = torch.rand(1,2,3,4)
print(a.transpose(0,3).transpose(1,2).size())
print(a.permute(3,2,1,0).size())
Comment

PREVIOUS NEXT
Code Example
Python :: chromebook install pip 
Python :: python sleep milliseconds 
Python :: python change filename 
Python :: pandas dataframe from dict 
Python :: pyautogui keyboard write 
Python :: unban discord.py 
Python :: python count the frequency of words in a list 
Python :: scroll to element python selenium 
Python :: pandas read csv with index 
Python :: py sleep function 
Python :: squared sum of all elements in list python 
Python :: python print in color 
Python :: python datetime to string iso 8601 
Python :: np array value count 
Python :: django docs case when 
Python :: import randomforestclassifier 
Python :: covariance matrix python 
Python :: find root directory of jupyter notebook 
Python :: pip version 
Python :: docker python 3.8 ubuntu 
Python :: droaw heat map in python for null values 
Python :: how to make a python program to count from 1 to 100 
Python :: python url encoding 
Python :: get video duration opencv python 
Python :: matplotlib matrix plot 
Python :: triangle pygame 
Python :: types of all columns pandas 
Python :: join two numpy 2d array 
Python :: load saved model pyspark 
Python :: Tensorflow not installing error 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =