April 23, 2024, 5:39 p.m. | Super Kai (Kazuya Ito)

DEV Community dev.to

sum() can get one or more sum values as shown below:


*Memos:




  • sum() can be used with torch or a tensor.

  • The tensor of zero or more integers, floating-point numbers, complex numbers or boolean values can be used.

  • A 0D or more D tensor can be used.

  • The 2nd argument(int, tuple of int or list of int) with torch or the 1st argument(int, tuple of int or list of int) with a tensor is dim(Optional) which is a dimension.

  • The …

cartesianprod integers memos numbers prod pytorch sum tensor torch values

AI Engineer Intern, Agents

@ Occam AI | US

AI Research Scientist

@ Vara | Berlin, Germany and Remote

Data Architect

@ University of Texas at Austin | Austin, TX

Data ETL Engineer

@ University of Texas at Austin | Austin, TX

Lead GNSS Data Scientist

@ Lurra Systems | Melbourne

Data Engineer - Takealot Group (Takealot.com | Superbalist.com | Mr D Food)

@ takealot.com | Cape Town