all AI news
sum(), prod() and cartesian_prod() in PyTorch
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 …
More from dev.to / DEV Community
Jobs in AI, ML, Big Data
Artificial Intelligence – Bioinformatic Expert
@ University of Texas Medical Branch | Galveston, TX
Lead Developer (AI)
@ Cere Network | San Francisco, US
Research Engineer
@ Allora Labs | Remote
Ecosystem Manager
@ Allora Labs | Remote
Founding AI Engineer, Agents
@ Occam AI | New York
AI Engineer Intern, Agents
@ Occam AI | US