当前位置:网站首页>Summary of sequential, modulelist, and moduledict usage in pytorch
Summary of sequential, modulelist, and moduledict usage in pytorch
2022-06-12 03:45:00 【AI vision netqi】
The following is from :
PyTorch Medium Sequential、ModuleList and ModuleDict Usage Summary _ Non late blog -CSDN Blog
1. Differences and connections
Let's start with a picture , To sum up their differences :

difference
nn.Sequential Internally implemented forward function , So you don't have to write forward function . and nn.ModuleList and nn.ModuleDict There is no implementation of internal forward function .
nn.Sequential It needs to be carried out in strict order , The other two modules can be called arbitrarily .
Here are the introduction .
1.1 nn.Sequential You cannot freely add or delete
nn.Sequential The modules inside are arranged in order , Therefore, it must be ensured that the output size of the previous module is consistent with the input size of the next module , Cannot add freely , Delete .
nn.Sequential Can be used in OrderedDict To specify each module Name .
1.2
边栏推荐
- Solution to missing in unity script
- [data recovery in North Asia] data recovery in which the logical volume of the server is changed and the file system is damaged due to system reinstallation
- Hacker + marathon =? Hacker marathon?
- Unity脚本出现missing时的解决方法
- Database selected 60 interview questions
- Drop down menu dropdown yyds dry inventory of semantic UI
- CA certificate and key pair application notes
- PostgreSQL basic introduction and deployment
- Image mosaic based on transformation matrix
- Kotlin协程协程作用域,CoroutineScope MainScope GlobalScope viewModelScope lifecycleScope 分别代表什么
猜你喜欢

Eight fallacies of distributed computing

19.tornado项目之优化数据库查询

Redis gets the set of keys prefixed with XXX

1187_ C language implementation of hysteresis processing

E-commerce middle office system architecture

KV storage separation principle and performance evaluation of nebula graph

如何修改mysql 查询出来的结果名称 结果1,结果2

Database selected 60 interview questions

The idea of setting the flash memory management and resource size, and the quantitative relationship among parallelism, slot, and taskmanager quantity

Steamvr--- grab objects
随机推荐
KV storage separation principle and performance evaluation of nebula graph
oralce 处理列转行的三种方式 最后生成表格样式数据
The solution to the error "xxx.pri has modification time XXXX s in the futrue" in the compilation of domestic Kirin QT
2022 communication industry ultimate Exhibition Guide
[Yugong series] March 2022 asp Net core Middleware - conditional routing
VIM command Encyclopedia
vim命令大全
(idea)the file size(2.85M) exceeds configured limit(2.56M).Code insight features are not available问题
[string] judge whether S2 is the rotation string of S1
[Yugong series] March 2022 asp Net core Middleware - current limiting
Domestic mobile phones are snubbing low-end consumers, and Nokia provides them with high-quality products
Special materials | household appliances, white electricity, kitchen electricity
Pat class B 1067 trial password (20 points)
Youcans' opencv lesson - 10 Image restoration and reconstruction
3769 moving stones (simulated)
golang的gin框架,各种接收参数的方式和各种绑定的区别?
Mysql/oracle takes the unique time as the boundary, and the sum is less than or equal to this time, and greater than this time
根據變換矩陣進行圖像拼接
TCP three handshakes and four waves
R语言plotly可视化:plotly可视化基础二维直方图、自定义设置二维直方图的颜色、二维直方图是二元分布的直方图可视化(Basic 2D Histogram)