all AI news
sort(), argsort() and msort() in PyTorch
April 19, 2024, 11:29 p.m. | Super Kai (Kazuya Ito)
DEV Community dev.to
sort() can get the zero or more sorted elements and their indices of a 0D or more D tensor in ascending(Default) or descending order as shown below:
*Memos:
sort() can be called both from torch and a tensor.- The 2nd argument(int) with torch or the 1st argument(int) with a tensor is dim(Optional-Defualt:-1) which is a dimension.
- The 3rd argument(bool) with torch or the 2nd argument(bool) with a tensor is descending(Optional-Default:False). *False is ascending order and True is descending order.
- The …
More from dev.to / DEV Community
Jobs in AI, ML, Big Data
Software Engineer for AI Training Data (School Specific)
@ G2i Inc | Remote
Software Engineer for AI Training Data (Python)
@ G2i Inc | Remote
Software Engineer for AI Training Data (Tier 2)
@ G2i Inc | Remote
Data Engineer
@ Lemon.io | Remote: Europe, LATAM, Canada, UK, Asia, Oceania
Artificial Intelligence – Bioinformatic Expert
@ University of Texas Medical Branch | Galveston, TX
Lead Developer (AI)
@ Cere Network | San Francisco, US