April 17, 2024, 1:35 a.m. | Super Kai (Kazuya Ito)

DEV Community dev.to

unique() can get the zero or more unique elements of a 0D or more D tensor as shown below:


*Memos:




  • unique() can be called both from torch and a tensor.

  • The 2nd argument with torch or the 1st argument with a tensor is sorted(Default:True). *Currently setting Falseis also sorted.

  • The 3rd argument with torch or the 2nd argument with a tensor is return_inverse(Default:False).

  • The 4th argument with torch or the 3rd argument with a tensor is return_counts(Default:False) which returns the …

function memos pytorch tensor torch true unique

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