Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

mean of torch tensor

torch.mean(input) 
Comment

torch mean of tensor

>>> a = torch.randn(1, 3)
>>> a
tensor([[ 0.2294, -0.5481,  1.3288]])
>>> torch.mean(a)
tensor(0.3367)
Comment

PREVIOUS NEXT
Code Example
Python :: array as an input in python 
Python :: numpy apply function to array 
Python :: smtp email template 
Python :: read excel file spyder 
Python :: make directory python 
Python :: Get a random joke in python 
Python :: python list of all characters 
Python :: add colorbar to figure matplotlib line plots 
Python :: ipython play sound 
Python :: pandas merge dataframes by column 
Python :: concat dataframe from list of dataframe 
Python :: df concat 
Python :: import pyplot python 
Python :: get count of unique values in column pandas 
Python :: python new line command 
Python :: join two dictionaries python 
Python :: groupby year datetime pandas 
Python :: matplotlib plot 2d point 
Python :: Column names reading csv file python 
Python :: connect with pyodbc with statement 
Python :: len of int python 
Python :: how to use sum with range python 
Python :: python dataframe remove header 
Python :: python3 yyyymmddhhmmss 
Python :: python create environment linux 
Python :: find the closest smaller value in an array python 
Python :: remove comments from python file 
Python :: how to plot corilation python 
Python :: dataframe summary pandas 
Python :: register model in admin django 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =