当前位置:网站首页>多个张量与多个卷积核做卷积运算的输出结果
多个张量与多个卷积核做卷积运算的输出结果
2022-07-01 19:08:00 【河北一帆】
import tensorflow as tf
inputValue = tf.constant([
#1个张量
[
#3行3列2深度
[[2, 5], [3, 3], [8, 2]],
[[6, 1], [1, 2], [5, 4]],
[[7, 9], [2, 3], [-1, 3]]
],
[
[[1, 3], [2, 1], [3, 2]],
[[1, 1], [2, 2], [1, 4]],
[[3, 4], [4, 2], [-1, 1]]
]
], tf.float32)
kernels = tf.constant([
# 2行
[
# 2列
[
# 2深度
[3, 1, -3], [1, -1, 7]
],
[
[-2, 2, -5], [2, 7, 3]
]
],
[
# 2列
[
[-1, 3, 1], [-3, -8, 6]
],
[
[4, 6, 8], [5, 9, -5]
]
]
], tf.float32)
validResult = tf.nn.conv2d(inputValue, kernels, [1, 1, 1, 1], "VALID")
print(validResult)
2个3行3列2深度的输入量与3个2行2列2深度的卷积和做卷积

输入量的深度与卷积和的深度必须相同
输出量的深度是卷积核的个数
输出量的个数是输入量的个数
输出量的行列数与padding和stride有关,卷积运算时,在个数和深度两个维度的stride都取1,行和列的stride视情况而定。
张量与卷积的理解,推荐《图解深度学习与神经网络:从张量到TensorFlow实现》_张平这本书
边栏推荐
- Win11 how to hide the taskbar? Win11 method to hide the taskbar
- 独家消息:阿里云悄然推出RPA云电脑,已与多家RPA厂商开放合作
- 使用Zadig从0到1搭建持续交付平台
- 由浅入深学会白盒测试用例设计
- 强大、好用、适合程序员/软件开发者的专业编辑器/笔记软件综合评测和全面推荐
- 网上开户是安全的吗?新手可以开炒股账户吗。
- What if the win11 shortcut key switching input method doesn't respond? Shortcut key switching input method does not respond
- Tensorflow reports an error, could not load dynamic library 'libcudnn so. eight
- [multithreading] lock strategy
- Optimization of the problem that the request flow fails to terminate during page switching of easycvr cluster video Plaza
猜你喜欢

Niuke programming question -- must brush the string of 101 (brush the question efficiently, draw inferences from one instance)

Target detection - Yolo series

Win11 how to hide the taskbar? Win11 method to hide the taskbar

Realize pyramids through JS (asterisk pyramid, palindrome symmetric digital pyramid)

How to connect the two nodes of the flow chart

NSI脚本的测试

Easycvr accesses the equipment through the national standard gb28181 protocol. What is the reason for the automatic streaming of the equipment?

3D全景模型展示可视化技术演示
![[Mysql]安装Mysql5.7](/img/c4/d7fb5ddf8e7be31f7a9ad68409e584.png)
[Mysql]安装Mysql5.7

基于图的 Affinity Propagation 聚类计算公式详解和代码示例
随机推荐
After adding cocoapods successfully, the header file cannot be imported or an error is reported in not found file
三菱PLC FX3U脉冲轴点动功能块(MC_Jog)
Internship: complex JSON format data compilation interface
The large list set is divided into multiple small list sets in equal proportion
How to create a pyramid with openmesh
Face recognition system opencv face detection
架构师毕业总结
简单但现代的服务器仪表板Dashdot
Tensorflow reports an error, could not load dynamic library 'libcudnn so. eight
Principle of motion capture system
Gaussdb (for MySQL):partial result cache, which accelerates the operator by caching intermediate results
math_ Use differentiation to calculate approximate value
强大的万年历微信小程序源码-支持多做流量主模式
Architect graduation summary
Solve the problem of slow or failed vscode download
Redis installation and startup in Windows environment (background startup)
Swiftui 4 new features complete toggle and mixed toggle multiple binding components
What else do you not know about new set()
【蓝桥杯Web】2022年第十三届蓝桥杯Web大学组国赛真题解析