当前位置:网站首页>多个张量与多个卷积核做卷积运算的输出结果
多个张量与多个卷积核做卷积运算的输出结果
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实现》_张平这本书
边栏推荐
- 大厂做狼,小厂做狗?
- switch 有四样写法你知道么
- What if the win11 shortcut key switching input method doesn't respond? Shortcut key switching input method does not respond
- 关于一个神奇函数的用法
- Win11快捷键切换输入法无反应怎么办?快捷键切换输入法没有反应
- [Mysql]安装Mysql5.7
- Comprehensive evaluation and detailed inventory of high-quality note taking software (I) note, obsedian, remnote, flowus
- 【C语言】详解 memset() 函数用法
- Stack Overflow 2022 开发者调查:行业走向何方?
- 随机头像大全,多分类带历史记录微信小程序源码_支持流量主
猜你喜欢
STC 32-bit 8051 single chip microcomputer development example tutorial three program compilation setting and download
[multithreading] lock strategy
How to connect the two nodes of the flow chart
Data analysts sound tall? Understand these points before you decide whether to transform
牛客编程题--必刷101之字符串(高效刷题,举一反三)
Win11如何取消任务栏隐藏?Win11取消任务栏隐藏的方法
Detailed configuration of network security "Splunk" in national vocational college skills competition
math_ Use differentiation to calculate approximate value
关联线探究,如何连接流程图的两个节点
RichView 文档中的 ITEM
随机推荐
8K HDR!|为 Chromium 实现 HEVC 硬解 - 原理/实测指南
强大的万年历微信小程序源码-支持多做流量主模式
After adding cocoapods successfully, the header file cannot be imported or an error is reported in not found file
Items in richview documents
Simple but modern server dashboard dashdot
Comprehensive evaluation and detailed inventory of high-quality note taking software (I) note, obsedian, remnote, flowus
Myslq ten kinds of locks, an article will take you to fully analyze
Data analysts sound tall? Understand these points before you decide whether to transform
Stack Overflow 2022 开发者调查:行业走向何方?
Uniapp uses Tencent map to select points without window monitoring to return users' location information. How to deal with it
人脸识别系统 —— OpenCV人脸检测
Set object value changes null value object
On the usage of a magic function
《软件工程导论(第六版)》 张海藩 复习笔记
Big factories are wolves, small factories are dogs?
STC 32-bit 8051 single chip microcomputer development example tutorial three program compilation setting and download
Error in installing sharp
RichView 文档中的 ITEM
SQL getting started plan-1-select
C # joint halcon Application - Dahua Camera Collection class