
pytorch
Coding_Ann
Work as dog, i like code
展开
-
pytorch学习:nn.ReflectionPad2d()
nn.ReflectionPad2d()功能:对数据进行padding公式:H(out) = H(in) + paddingTop + paddingBottomW(out) = W(in) + paddingLeft + paddingRight案例:import torchimport torch.nn as nnx = torch.randin((2,3,3,3))pad = nn.ReflectionPad2d((2,2,1,1)) # left,right,top,bottom原创 2021-02-25 19:44:14 · 690 阅读 · 0 评论 -
pytorch从预训练模型提取图像特征计算featureless
1.背景描述想借助一个预训练好的网络(非集成好的)计算feature-loss,预训练网络地址:表情识别net2具体实操2.1 加载模型作者已经给出了预训练好的模型参数和模型代码,首先我们要把模型load进来: from Expression.VGG import VGG model = VGG('VGG19') #check_pth 从网站上download下来P...原创 2020-03-05 12:21:53 · 1652 阅读 · 0 评论