Pytorch学习
两个幽灵
这个作者很懒,什么都没留下…
展开
-
Pytorch学习(7)——Seq2Seq与Attention
视频地址:https://www.bilibili.com/video/BV1vz4y1R7Mm?p=7Sqe2Seq, Attention先去https://github.com/ZeweiChu/PyTorch-Course/tree/master/notebooks下载数据集(nmt文件夹)import osimport sysimport mathfrom collections import Counterimport numpy as npimport randomimp转载 2020-07-12 17:33:51 · 817 阅读 · 0 评论 -
Pytorch学习(6)——图像风格迁移和图像生成
视频地址:https://www.bilibili.com/video/BV1vz4y1R7Mm?p=6from __future__ import division%matplotlib inlinefrom torchvision import modelsfrom PIL import Imageimport argparseimport torchimport torchvisionimport torch.nn as nnimport numpy as npimport ma转载 2020-07-05 16:44:14 · 1905 阅读 · 0 评论 -
Pytorch学习(5)——简单图片分类
import numpy as npimport torchimport torch.nn as nnimport torch.optim as optimimport torchvisionfrom torchvision import datasets, transformsprint("torch", torch.__version__)print("torchvision", torchvision.__version__)device = torch.device("cuda" i转载 2020-06-27 16:31:44 · 779 阅读 · 0 评论 -
Pytorch学习(4)——自然语言分类模型
视频链接:https://www.bilibili.com/video/BV1vz4y1R7Mm?p=4预先下载 https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.3.0/en_core_web_sm-2.3.0.tar.gz然后将其解压下面的tokenizer_language设置为 解压路径 + “en_core_web_sm-2.3.0\en_core_web_sm\en_core_web_s转载 2020-06-18 17:42:07 · 1297 阅读 · 0 评论 -
Pytorch学习(3)——语言模型
教程:https://www.bilibili.com/video/BV1vz4y1R7Mm?p=3import torchtextfrom torchtext.vocab import Vectorsimport torchimport numpy as npimport randomUSE_CUDA = torch.cuda.is_available()device = torch.device("cuda" if torch.cuda.is_available() else "cpu"转载 2020-06-13 18:21:26 · 650 阅读 · 0 评论 -
Pytorch学习(2)——训练词向量的代码
教程:https://www.bilibili.com/video/BV1vz4y1R7Mm?p=2import torchimport torch.nn as nnimport torch.nn.functional as Fimport torch.utils.data as tudfrom collections import Counterimport numpy as npimport randomimport mathimport pandas as pdimport s转载 2020-06-12 21:04:11 · 912 阅读 · 2 评论