当前位置:网站首页>Tensorflow and pytorch middle note feature map size adjustment to achieve up sampling
Tensorflow and pytorch middle note feature map size adjustment to achieve up sampling
2022-04-23 20:48:00 【NuerNuer】
1.tensorflow:
tf.image.resize_images(fea, size, method)
'''
fea: feature map
size: The goal is size, example :(300, 300)
method = 0 Bilinear interpolation
method = 1 Nearest neighbor law
method = 2 Bicubic interpolation
method = 3 Area interpolation
'''
Commonly used in , adjustment feature map The size of the , Further add convolution to adjust the number of channels to complete up sampling
2.torch:
torch.nn.functional.interpolate
(x,
size,
scale_factor,
mode="bilinear",
align_corners=True,
recompute_scale_factor=None
)
'''
x: feature map
size: The goal is size, example (128,128)
scale_factor: Multiple of change
mode: 'nearest','linear','bilinear','bicubic','trilinear','area'. Default :'nearest'
'''
This paper records Basic application mode , About align_corners and recompute_scale_factor For detailed explanation of parameters and some precautions, please refer to :https://blog.csdn.net/qq_50001789/article/details/120297401
Commonly used in , adjustment feature map The size of the , Further add convolution to adjust the number of channels to complete up sampling
Except for this On the sampling The way , The more common up sampling methods are deconvolution
tf2: layers.Conv2DTranspose()
torch: torch.nn.ConvTranspose2d()
版权声明
本文为[NuerNuer]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210545522452.html
边栏推荐
猜你喜欢
电脑越用越慢怎么办?文件误删除恢复方法
Minecraft 1.12.2模组开发(四十三) 自定义盾牌(Shield)
一些接地气的话儿
Reentrant function
41. 缺失的第一个正数
Zhongchuang storage | how to choose a useful distributed storage cloud disk
Common problems in deploying projects with laravel and composer for PHP
Addition, deletion, modification and query of advanced MySQL data (DML)
go interface
Mysql database common sense storage engine
随机推荐
Selenium displays webdriverwait
ros功能包内自定义消息引用失败
高薪程序员&面试题精讲系列91之Limit 20000加载很慢怎么解决?如何定位慢SQL?
A login and exit component based on token
Factory mode
Resolve the eslint warning -- ignore the warning that there is no space between the method name and ()
Google 尝试在 Chrome 中使用 Rust
启牛学堂有用吗,推荐的证券账户是否安全
Async function ------ ES6
[SQL] string series 2: split a string into multiple lines according to specific characters
vulnhub DC:1渗透笔记
Awk example skills
Introduction to standardization, regularization and normalization
Unity animation creates sequence frame code and generates animationclip
The problem of 1 pixel border on the mobile terminal
Sequential state
Summary and effect analysis of methods for calculating binocular parallax
Deep analysis of C language pointer (Part I)
[matlab 2016 use mex command to find editor visual studio 2019]
Solution: NPM err! code ELIFECYCLE npm ERR! errno 1