上一页 1 ··· 43 44 45 46 47 48 49 50 51 ··· 72 下一页
摘要: 阅读全文
posted @ 2020-10-09 11:17 Picassooo 阅读(128) 评论(0) 推荐(0)
摘要: 介绍 图片摘自stackoverflow: what-is-the-difference-between-fit-fit-transform-and-transform 例一 from sklearn.preprocessing import StandardScaler ss = Standard 阅读全文
posted @ 2020-10-03 23:01 Picassooo 阅读(1262) 评论(0) 推荐(0)
摘要: 变量.grad_fn表明该变量是怎么来的,用于指导反向传播。例如loss = a+b,则loss.gard_fn为<AddBackward0 at 0x7f2c90393748>,表明loss是由相加得来的,这个grad_fn可指导怎么求a和b的导数。 程序示例: import torch w1 = 阅读全文
posted @ 2020-10-01 10:40 Picassooo 阅读(16327) 评论(3) 推荐(2)
摘要: 把数据从CPU迁移到GPU时,可以用.cuda()方法,也可以用.to(device)方法。示例如下。 .cuda()方法 import torch import time t = time.time() b = torch.rand([1024, 1024, 10]) b = b.cuda() p 阅读全文
posted @ 2020-09-29 14:57 Picassooo 阅读(11253) 评论(7) 推荐(2)
摘要: 参考一 浅谈 PyTorch 中的 tensor 及使用 该博文分为以下6个部分: tensor.requires_grad torch.no_grad() 反向传播及网络的更新 tensor.detach() CPU and GPU tensor.item() torch.detach()和tor 阅读全文
posted @ 2020-09-29 11:04 Picassooo 阅读(2804) 评论(0) 推荐(1)
摘要: 一个关于显卡利用率的问题 阅读全文
posted @ 2020-09-27 17:25 Picassooo 阅读(201) 评论(0) 推荐(0)
摘要: 解决Python print end 一行输出不显示的问题 阅读全文
posted @ 2020-09-26 21:57 Picassooo 阅读(517) 评论(0) 推荐(0)
摘要: 模型和数据可以在CPU和GPU上来回迁移,怎么判断模型和数据在哪里呢? import torch import torch.nn as nn # 判断模型是在CPU还是GPU上 model = nn.LSTM(input_size=10, hidden_size=4, num_layers=1, b 阅读全文
posted @ 2020-09-26 21:25 Picassooo 阅读(34414) 评论(0) 推荐(2)
摘要: 标准正态分布的概率密度公式 正态分布概率密度公式 多元正态分布的概率密度公式 上式为 x 服从 k 元正态分布,x 为 k 维向量;|Σ| 代表协方差矩阵的行列式。 二维正态分布概率密度函数为钟形曲面,等高线是椭圆线族,并且二维正态分布的两个边缘分布都是一维正态分布,如图 numpy生成一个服从多元 阅读全文
posted @ 2020-09-26 16:20 Picassooo 阅读(7825) 评论(2) 推荐(1)
摘要: WAE-GAN和WAE-MMD的PyTorch实现 阅读全文
posted @ 2020-09-23 22:37 Picassooo 阅读(775) 评论(0) 推荐(0)
上一页 1 ··· 43 44 45 46 47 48 49 50 51 ··· 72 下一页