- 博客(11)
- 收藏
- 关注
原创 Leveraging the Invariant Side of Generative Zero-Shot Learning【CVPR2019】
PDF:Leveraging the Invariant Side of Generative Zero-Shot Learningcode:implement by pytorch摘要Conventional zero-shot learning (ZSL) methods generally learn an embedding, e.g., visual-semantic mappin...
2020-01-17 15:25:02 793
原创 Generalized Zero- and Few-Shot Learning via Aligned Variational Autoencoders【CVPR2019】
Generalized Zero- and Few-Shot Learning via Aligned Variational Autoencoders摘要网络结构图![在这里插入图片描述](https://img-blog.csdnimg.cn/20190816160725575.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdG...
2019-08-16 17:02:24 1006
原创 Meta-learning with latent embedding optimization【论文笔记】
Gradient-based meta-learning techniques are both widely applicable and proficient at solving challenging few-shot learning and fast adaptation problems. However, they have practical difficulties when operating on high-dimensional parameter spaces in extrem
2019-07-17 11:33:17 1547
原创 deepin15.9安装PyTorch,cuda和cudnn
deepin安装pytorch,cuda,cudnn本文针对deepin15.9进入Bios关闭集成显卡对deepin换源第一步:备份官方默认源sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak第二步:打开sources.listsudo gedit /etc/apt/sources.list第三步:换源## Gen...
2019-06-02 02:57:46 1004
原创 步长为s的二维卷积Python实现
import numpy as npx = np.arange(1, 21).reshape(5, 4)w = np.array([[1, 1], [-1, -1]])def my_conv(input, kernel, s): output_size_0 = int((len(input) - len(kernel)) / s + 1) # 输出结果的第0维长度 o...
2019-05-16 10:11:24 1553 1
原创 将分类存储的图片切分为训练集、验证集和测试集(PyTorch实现)
在实验中,经常遇到图片数据是分类存储的—即不同的文件夹存放不同label的图片,比如猫狗数据集,将猫的数据放在cat文件夹下,而将狗的图片放在名为dog的文件夹。在跑模型的过程中,常常需要将数据切分为训练集、验证集和测试集,并且同一类别的label要一致。from torchvision.datasets import ImageFolderfrom PIL import Imagefrom...
2019-04-28 21:14:55 12238 10
原创 PyTorch将CIFAR100数据按类标归类保存
few-shot learning的采样Few-shot learning 基于任务对模型进行训练,在N-way-K-shot中,一个任务中的meta-training中含有N类,每一类抽取K个样本构成support set, query set则是在刚才抽取的N类剩余的样本中sample一定数量的样本(可以是均匀采样,也可以是不均匀采样)。对数据按类标归类针对上述情况,我们需要使用不同类别...
2019-04-17 21:27:09 4985 5
原创 Python创建并保存json文件,支持数据更新保存
import jsonclass Params(): """Class that loads hyperparameters from a json file. Example: ``` params = Params(json_path) print(params.learning_rate) param...
2019-04-10 10:58:53 11969
原创 PyTorch加载预训练模型(pretrained)
使用预训练模型的代码如下:# 加载预训练模型 resNet50 = models.resnet50(pretrained=True) ResNet50 = ResNet(Bottleneck, [3, 4, 6, 3], num_classes=2) # 读取参数 pretrained_dict = resNet50.state_dict() model...
2019-04-10 10:53:40 11250
原创 transforms图片处理操作
使用jupyter notebook编译器from PIL import Imagefrom torchvision import transforms as Timport torch as tto_tensor = T.ToTensor()to_pil = T.ToPILImage()lena = Image.open('/home/xie/图片/lena.jpg')lena...
2019-03-30 13:45:53 2380
原创 神经网络中的交叉熵
神经网络中的交叉熵作为分类问题中的损失函数PyTorch中的交叉熵作为分类问题中的损失函数在神经网络的多分类问题中,常常使用one-hot的方法设置n类输出,比如在手写体识别问题中,如果是数字1,神经网络的输出越接近[0,1,0,0,0,0,0,0,0,0]越好。那么如何衡量神经网络与label的接近程度呢?交叉熵是常用的使用方法。其刻画的是两个概率分布之间的距离。交叉熵是信息论中的概念。对...
2019-03-22 10:44:03 3283
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人