all AI news
Set out with out argument functions PyTorch
June 29, 2024, 12:19 a.m. | Super Kai (Kazuya Ito)
DEV Community dev.to
You can set out with the functions which have out argument as shown below:
*Memos:
- I selected some popular keepdim argument functions such as arange(),
rand()
add(),
mean(),
median(), min(),
max(),
all(),
any() and matmul().
out(Optional, tensor) can output a tensor. *Sometimes, out(Optional, tuple(tensor, tensor) or list(tensor, tensor)).- Basically, out= is needed.
- Sometimes, out needs to be used with dim.
arange(). *My post explains arange():
import torch
torch.arange(start=5, end=15, step=4)
# …
argument function functions keepdim list matmul max mean median memos min out output popular pytorch rand set tensor you
More from dev.to / DEV Community
Jobs in AI, ML, Big Data
Data Engineer
@ Michelin | Pune
Senior Research Analyst, Global Analytics & Measurement
@ NBCUniversal | London, United Kingdom
Research Scientist
@ Meta | Menlo Park, CA
NLP Speech Research Intern
@ Tencent | UK-London
Junior Senior Reliability Engineer
@ NielsenIQ | Bogotá, Colombia
[Job - 15712] Vaga Afirmativa para Mulheres - QA (Automation), SR
@ CI&T | Brazil