当前位置:网站首页>Summary of image classification based on pytoch: swing transformer
Summary of image classification based on pytoch: swing transformer
2022-06-22 03:27:00 【Steady, not very cold, strong brother】
Swin Transformer Detailed explanation and program interpretation of the paper - You know (zhihu.com)
Swin Transformer Detailed explanation and program interpretation of the paper - You know (zhihu.com)
Swin Transformer: Hierarchical Vision Transformer using Shifted Windows (arxiv.org)
swin_transformer Used for image classification ( Has run through )swin transformer Image classification
Pytorch Download data set of _ Tut tut tut biubiu The blog of -CSDN Blog _pytorch Download datasets
pytorch Save picture and channel order _pytorch Change the channel order
PyTorch Learning notes :transforms Twenty two ways to (transforms The usage is very detailed
numpy.clip(a, a_min, a_max, out=None)
a Is an array , The last two parameters represent the minimum and maximum values respectively .
in other words clip This function limits the elements in the array to a_min, a_max Between , Greater than a_max That makes it equal to a_max, Less than a_min, That makes it equal to a_min.
pytorch Of clamp Same as np.clip: Be confined to a certain range
torch.clamp(input,min,max,out=None)
take input The elements in are limited to [min,max] And returns a Tensor
# Pytorch Inverse normalization
# https://discuss.pytorch.org/t/simple-way-to-inverse-transform-normalization/4821/3
class UnNormalize(object):
def __init__(self,mean,std):
self.mean=mean
self.std=std
def __call__(self,tensor):
"""
Args:
:param tensor: tensor image of size (B,C,H,W) to be un-normalized
:return: UnNormalized image
"""
for t, m, s in zip(tensor,self.mean,self.std):
t.mul_(s).add_(m)
pytorch in transform function
torchvision.transforms yes pytorch Image preprocessing package in
It's usually used Compose Put multiple steps together :
for instance
transforms.Compose([
transforms.CenterCrop(10),
transforms.ToTensor(),
])边栏推荐
猜你喜欢
![[nvme2.0b 6] nvme queue model](/img/e9/d29001cebeebe9677b02ffb7c25726.png)
[nvme2.0b 6] nvme queue model
![[summary of leetcode weekly competition] summary of the 298th weekly competition of leetcode (6.19)](/img/72/d3e46a820796a48b458cd2d0a18f8f.png)
[summary of leetcode weekly competition] summary of the 298th weekly competition of leetcode (6.19)

策略模式

【NVMe2.0b 9】控制器初始化过程

Harmonyos Hongmeng uses ORM bee to access database instances

为什么在高并发下很容易就被setInterval给坑了

3000元投影仪对比评测,当贝D3X完胜极米NEW Z6 X

360edr planing

调度功能:splunk-operator-controller-manager

(problem solving) missing gcr io/kubebuilder/kube-rbac-proxy:v0.8.0
随机推荐
深度学习期末复习
【爬虫笔记2】鼠标事件与截图方法、常用攻击方法
[microservices | Nacos] Nacos implements the advanced version of distributed configuration center
Installing and using mysql8 under Linux (Reprint)
Redis6.0 new features (Part 2)
[nvme2.0b 5] sous - système nvm
【爬虫笔记1】环境搭建和必要工具Selenium
On the auto increment of int type primary key in MySQL
3000元投影仪对比评测,当贝D3X完胜极米NEW Z6 X
golang并发编程之runtime包
Redis configuration and optimization
sequelize 常用命令使用
Configuration and optimization of redis cache database
[microservices | Nacos] quickly realize the configuration center function of Nacos, and complete configuration update and version iteration
TX2 mirror source settings
AtCoder Beginner Contest 252(dijkstra,逆向思维)
Lectures explanation for unsupervised graph level representation learning (usib)
eu5,eu7,ex3,ex5安装第三方app
[nvme2.0b 10] controller shutdown and NVM subsystem shutdown
vim常用命令