当前位置:网站首页>tf. keras. layers. Timedistributed function
tf. keras. layers. Timedistributed function
2022-04-23 02:56:00 【Live up to your youth】
The function prototype
tf.keras.layers.TimeDistributed(layer,
**kwargs
)
Function description
The time distribution layer is mainly used to slice the time dimension of the input data . At each time step , Enter one item in turn , And output one item in turn .
In the diagram above , The function of the time distribution layer is in time t input data w, Output data x; In time t1 input data x, Output data y. Enter... In turn in each time slice 、 Output a data , Instead of entering multiple items directly , Output multiple .
Parameters layer For one tf.keras.layers.Layer example . The input data is at least one three-dimensional tensor , If the input data is text sequence data , The input is a three-dimensional tensor , Shape is (batch_size, time, output_dim), If the input data is video data , The input is a five-dimensional tensor , Shape is (batch_size, time, height, width, channels).
The time distribution layer is used to process data with time dimension , It is not applicable to data without time dimension such as images .
Function USES
model = tf.keras.models.Sequential([
# Embedded layer
tf.keras.layers.Embedding(len(words), 125),
# LSTM layer
tf.keras.layers.LSTM(125, return_sequences=True),
# LSTM layer
tf.keras.layers.LSTM(125, return_sequences=True),
# Fully connected in the time dimension Dense layer
tf.keras.layers.TimeDistributed(tf.keras.layers.Dense(len(words), activation="softmax"))
])
Model: "sequential"
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
embedding (Embedding) (None, None, 125) 32000
lstm (LSTM) (None, None, 125) 125500
lstm_1 (LSTM) (None, None, 125) 125500
time_distributed (TimeDistr (None, None, 256) 32256
ibuted)
=================================================================
Total params: 315,256
Trainable params: 315,256
Non-trainable params: 0
_________________________________________________________________
版权声明
本文为[Live up to your youth]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220657127161.html
边栏推荐
- Airtrack cracking wireless network password (Dictionary running method)
- Shell learning notes -- shell processing of output stream awk
- Six very 6 computer driver managers: what software is good for driver upgrade? Recommended by the best computer driver management software abroad
- 机器学习(周志华) 第十四章概率图模型
- Source code and some understanding of employee management system based on polymorphism
- 重大危险源企业如何保障年底前完成双预防机制数字化建设任务
- Rhcsa second day operation
- When using art template inheritance, compileerror: invalid or unexpected token generated
- OCR recognition PDF file
- Specific field information of MySQL export table (detailed operation of Navicat client)
猜你喜欢

Slave should be able to synchronize with the master in tests/integration/replication-psync.tcl

Machine learning (Zhou Zhihua) Chapter 14 probability graph model

工业互联网+危化安全生产综合管理平台怎样建

Leangoo brain map - shared multi person collaborative mind mapping tool

Traversal of l2-006 tree (middle and later order determination binary tree & sequence traversal)

php+mysql对下拉框搜索的内容修改

windows MySQL8 zip安装

JS learning notes

L2-006 樹的遍曆(中後序確定二叉樹&層序遍曆)

Cloud computing learning 1 - openstack cloud computing installation and deployment steps with pictures and texts (Xiandian 2.2)
随机推荐
Jz76 delete duplicate nodes in linked list
The space between the left and right of the movie ticket seats is empty and cannot be selected
JZ22 鏈錶中倒數最後k個結點
【工欲善其事必先利其器】论文编辑及文献管理(Endnote,Latex,JabRef ,overleaf)资源下载及使用指南
Decision tree principle of machine learning
Store consumption SMS notification template
Résumé du gestionnaire de projet du système d'information Chapitre VI gestion des ressources humaines du projet
MySQL insert free column
Modify the content of MySQL + PHP drop-down box
Regular object type conversion tool - Common DOM class
JSON data text
Opencv reads webcam video and saves it locally
How can enterprises with major hazard installations ensure the completion of the digital construction task of double prevention mechanism by the end of the year
Typescript Learning Guide
《信息系统项目管理师总结》第五章 项目质量管理
mysql function函数语法
Kubernetes study notes
Leangoo brain map - shared multi person collaborative mind mapping tool
JZ35 replication of complex linked list
Essential qualities of advanced programmers