yipeiwu_com5年前
pytorch中训练完网络后,需要对学习的结果进行测试。官网上例程用的方法统统都是正确率,使用的是torch.eq()这个函数。 但是为了更精细的评价结果,我们还需要计算其他各个指标。在...
yipeiwu_com5年前
分类器平均准确率计算: correct = torch.zeros(1).squeeze().cuda() total = torch.zeros(1).squeeze().cuda...
yipeiwu_com5年前
值得学习的地方: 1.选择合法索引的方式 2.数组转图像显示 import numpy as np from PIL import Image #input : shape(N,...
yipeiwu_com5年前
本机中原pyinstaller版本为3.5版本,本打算通过 pip install --upgrade pyinstaller进行升级,竟然报错,后面卸载再重新安装也一样报错,没办法看来...
yipeiwu_com5年前
pytorch 在torchvision包里面有很多的的打包好的数据集,例如minist,Imagenet-12,CIFAR10 和CIFAR100。在torchvision的datas...
yipeiwu_com5年前
我就废话不多说了,直接上代码吧! class Net(nn.Module): def __init__(self , model): super(Net, self)._...
yipeiwu_com5年前
finetune分为全局finetune和局部finetune。首先介绍一下局部finetune步骤: 1.固定参数 for name, child in model.named...
yipeiwu_com5年前
实验环境 win10 + anaconda + jupyter notebook Pytorch1.1.0 Python3.7 gpu环境(可选) MNIST数据集介绍 MNIST 包...
yipeiwu_com5年前
本文将原始的numpy array数据在pytorch下封装为Dataset类的数据集,为后续深度网络训练提供数据。 加载并保存图像信息 首先导入需要的库,定义各种路径。 impor...
yipeiwu_com5年前
在web应用中,常常会遇见点击某个链接会弹出一个新的窗口,或者是相互关联的web应用 ,这样要去操作新窗口中的元素,这时就需要主机切换到新窗口进行操作。。WebDriver 提供了swi...