当前位置:网站首页>PyTorch 使用 MaxPool 实现图像的膨胀和腐蚀
PyTorch 使用 MaxPool 实现图像的膨胀和腐蚀
2022-07-28 05:17:00 【一知半解百晓生】
max_pool = nn.MaxPool2d(kernel_size=5, stride=1, padding=2) # 可调整 kernel_size 和 padding
# 假设要处理的张量为 tensor
# ===== 膨胀 =====
tensor_dilate = max_pool(tensor)
# ===== 腐蚀 =====
tensor_erode = -max_pool(-tensor)
边栏推荐
- PC side bug record
- Video twins: the starting point of informatization upgrading of smart Parks
- Bean的作用域、执行流程、生命周期
- Scope, execution process and life cycle of bean
- mysql中使用list作为参数进行查询
- 论文模型主图范例
- You must configure either the server or JDBC driver (via the ‘serverTimezone)
- regular expression
- ArrayList多线程安全解决办法
- How practical is the struct module? Learn a knowledge point immediately
猜你喜欢

Multi module packaging: package: XXX does not exist

Database date types are all 0

mysql的日期与时间函数,varchar与date相互转换

After ruoyi generates the code corresponding to the database, what should I do to make the following image look like

类和对象【中】

JMeter related knowledge sorting

架构设计思考之一(SSO设计)

框架一步一步方便使用的流程

个人写的一个文件上传工具网站

CentOS7安装MySQL5.7
随机推荐
Long和Integer如何进行比较,为什么报错
Share several methods of managing flag bits in C program
YUV to uiimage
Making RPM packages with nfpm
Eccv2022 | 29 papers of Tencent Youtu were selected, including face security, image segmentation, target detection and other research directions
【MySQL】MySQL时区问题、数据库时间相差8小时问题解决
Mysql基本查询
架构设计思考合集
2022 summer practice (PowerDesigner tutorial learning record) (first week)
注册中心服务eureka 切换到 nocas遇到的问题
First acquaintance with C language (1)
Test Development - UI testing in automated testing
个人写的一个文件上传工具网站
架构设计思考之一(SSO设计)
Export excel, generate multiple sheet pages, and name them
regular expression
FusionGAN代码学习(一)
docker 部署 mysql5.7.35
Performance test classification
Scope, execution process and life cycle of bean