![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
Pytorch深度学习学习笔记
记录自己学习Pytorch和深度学习的过程
一头秀发的假程序猿
国内某大学研究生,搞搞电路,搞搞单片机、无人机、智能车,搞搞嵌入式Linux,搞搞Python,搞搞图像处理,搞搞机器学习。。
展开
-
pytorch12-基于VGG19搭建FCN-8s语义分割网络(VOC2012数据集)
import copyimport timeimport numpy as npimport pandas as pdimport matplotlib.pyplot as pltfrom PIL import Imageimport torchfrom torchsummary import summaryfrom torch import nnimport torch.nn.functional as Fimport torch.utils.data as Dataimport .原创 2021-06-06 16:37:07 · 980 阅读 · 0 评论 -
pytorch11-调用训练好的fcn_resnet101进行语义分割
import numpy as npimport pandas as pdimport matplotlib.pyplot as pltimport PILimport torchfrom torchvision import transformsimport torchvisionmodel = torchvision.models.segmentation.fcn_resnet101(pretrained=True)model.eval()image = PIL.Image.ope.原创 2021-06-06 16:32:20 · 1386 阅读 · 0 评论 -
pytorch10-基于自编码网络的数据重构和网络编码特征可视化
import numpy as npimport pandas as pdimport matplotlib.pyplot as pltfrom mpl_toolkits.mplot3d import Axes3Dimport hiddenlayer as hlfrom sklearn.manifold import TSNEfrom sklearn.svm import SVCfrom sklearn.decomposition import PCAfrom sklearn.metric.原创 2021-06-01 22:22:15 · 318 阅读 · 2 评论 -
pytorch9-微调VGG16网络(基于kaggle数据集识别10种猴)
import hiddenlayer as hlimport torchimport torch.nn as nnfrom torch.optim import SGD, Adamimport torch.utils.data as Datafrom torchvision import modelsfrom torchvision import transformsfrom torchvision.datasets import ImageFolder# 导入预训练好的vgg16网络.原创 2021-05-30 20:53:28 · 609 阅读 · 0 评论 -
pytorch8-基于FashionMNIST搭建卷积神经网络进行识别
import torchimport torch.nn as nnimport torch.utils.data as Dataimport matplotlib.pyplot as pltimport pandas as pdfrom sklearn.metrics import accuracy_score, confusion_matrix, classification_reportimport torchimport seaborn as snsimport copyimpor.原创 2021-05-30 20:45:02 · 326 阅读 · 0 评论 -
pytorch7-可视化训练过程(过程中显示)
import torchimport torch.nn as nnimport torchvisionimport torchvision.utils as vutilsfrom torch.optim import SGDimport torch.utils.data as Datafrom sklearn.metrics import accuracy_scoreimport matplotlib.pyplot as pltimport hiddenlayer as hlfrom t.原创 2021-05-30 20:42:36 · 487 阅读 · 0 评论 -
pytorch6-可视化训练过程(结束后保存图片及记录)
import torchimport torch.nn as nnimport torchvisionimport torchvision.utils as vutilsfrom torch.optim import SGDimport torch.utils.data as Datafrom sklearn.metrics import accuracy_scoreimport matplotlib.pyplot as pltimport hiddenlayer as hlfrom t.原创 2021-05-30 20:41:10 · 1193 阅读 · 0 评论 -
pytorch5-各种常用激活函数
import matplotlib.pyplot as pltimport torchfrom torch import nnx = torch.linspace(-6, 6, 10)sigmoid = nn.Sigmoid() # sigmoid激活函数ysigmoid = sigmoid(x)tanh = nn.Tanh() # tanh激活函数ytanh = tanh(x)relu = nn.ReLU() # Relu激活函数yrelu = relu(x)softplu.原创 2021-05-30 20:33:05 · 152 阅读 · 0 评论 -
pytorch4-全卷积神经网络
import torchimport torch.nn as nnfrom torch.optim import SGDimport torch.utils.data as Datafrom sklearn.datasets import load_bostonfrom sklearn.preprocessing import StandardScalerimport pandas as pdimport numpy as npimport matplotlib.pyplot as plt.原创 2021-05-30 20:30:56 · 379 阅读 · 0 评论 -
pytorch3-基于mnist数据集的简单卷积网络
import torchimport torchvisionfrom torch.utils.data import DataLoaderimport torch.nn as nnimport torch.nn.functional as Fimport torch.optim as optimimport matplotlib.pyplot as pltn_epochs = 3batch_size_train = 64batch_size_test = 1000learnin.原创 2021-05-30 20:26:06 · 246 阅读 · 0 评论 -
pytorch2-基于minst数据集的简单全连接网络
# coding = utf-8import numpy as npimport torchfrom torchvision import transforms_task = transforms.Compose([ transforms.ToTensor(), transforms.Normalize( [0.5], [0.5] )])from torchvision.datasets import MNIST# 数据集加载mnist = M.原创 2021-05-30 20:23:31 · 135 阅读 · 0 评论 -
pytorch1-基于Pytorch的CIFAR-10图片分类
# coding = utf-8# 基于Pytorch的CIFAR-10图片分类import torchimport torch.nnimport numpy as npfrom torchvision.datasets import CIFAR10from torchvision import transformsfrom torch.utils.data import DataLoaderfrom torch.utils.data.sampler import SubsetRandom.原创 2021-05-30 20:19:08 · 204 阅读 · 0 评论