当前位置:网站首页>9. High order operation
9. High order operation
2022-07-27 05:59:00 【Pie star's favorite spongebob】
List of articles
torch.where(condition,x,y)
Is selected according to conditions A still B
Three parameters ,(condition,A,B), Generated C It may come from A( Direct copy ) or B, Part of it comes from A Sure C【0】= A【0】,C【1】=A【1】, But if it comes from C【0,0,1】=A【0,0,1】,C【0,0,2】=B【0,0,2】 etc. , Not as regular as before , You can write condition In the table . In from condition In the table ,1 The place comes from A.
condition The higher the value inside , Taken from the A The higher the probability , Give a condition greater than
0.5 Taken from the A.
for i
for y
if c[i][j]=A[i][j]
This is from cpu The control of the , Very non parallel . We only generate such a condition matrix , Our assignment statements can be highly parallelized , The best thing is to use GPU.
torch.gather(input,dim,index)
Operation of table lookup
Why do you need , Price reference table A, Index of things you need to buy B, Generated C Need basis B According to A Generate items , according to B Index in 0 stay A The collection index in is 0 Item name of .
gather Three parameters , The first is the original table we want to check , The second is dimension , The third is the index table we need , Then output the contents of an original table sorted by the index table .
out[i][j][k]=input[i][j][index[i][j][k] #if dim=2
边栏推荐
- 2020年PHP中级面试知识点及答案
- 新冠时空分析——Global evidence of expressed sentiment alterations during the COVID-19 pandemic
- 贪心高性能神经网络与AI芯片应用研修
- 你真的了解 Session 和 Cookie 吗?
- 1.PyTorch简介
- 【并发编程系列9】阻塞队列之PriorityBlockingQueue,DelayQueue原理分析
- 15.GPU加速、minist测试实战和visdom可视化
- Numpy基础学习
- Gbase 8C - SQL reference 6 SQL syntax (5)
- leetcode系列(一):买卖股票
猜你喜欢

Digital image processing Chapter 5 - image restoration and reconstruction

NFT new paradigm, okaleido innovation NFT aggregation trading ecosystem

数字图像处理 第一章 绪论

Minio8.x version setting policy bucket policy

数字图像处理 第二章 数字图像基础

新冠时空分析——Global evidence of expressed sentiment alterations during the COVID-19 pandemic

Seven enabling schemes of m-dao help Dao ecology move towards mode and standardization

GBase 8c产品简介

8.数学运算与属性统计

The LAF protocol elephant of defi 2.0 may be one of the few profit-making means in your bear market
随机推荐
3.分类问题---手写数字识别初体验
MySQL索引失效与解决方法实践
GBase 8c产品简介
Gbase 8C - SQL reference 6 SQL syntax (2)
Seven enabling schemes of m-dao help Dao ecology move towards mode and standardization
GBASE 8C——SQL参考6 sql语法(11)
数字图像处理 第八章——图像压缩
GBASE 8C——SQL参考6 sql语法(3)
9.高阶操作
Day 15. Deep learning radiomics can predict axillary lymphnode status in early-stage breast cancer
Gbase 8C - SQL reference 6 SQL syntax (3)
golang中slice切片使用的误区
【好文种草】根域名的知识 - 阮一峰的网络日志
身为技术管理者应该具备的素质(猜想)
你真的了解 Session 和 Cookie 吗?
Move protocol launched a beta version, and you can "0" participate in p2e
Day 8.Developing Simplified Chinese Psychological Linguistic Analysis Dictionary for Microblog
Okaleido launched the fusion mining mode, which is the only way for Oka to verify the current output
GBASE 8C——SQL参考 5 全文检索
Gbase 8C - SQL reference 6 SQL syntax (5)