![](https://img-blog.csdnimg.cn/20190927151101105.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
PyTorch 学习
非教程,仅记录踩坑和有意思的代码。
chenxi yan
stay hungry, stay young.
展开
-
RuntimeError: CUDA error: device-side assert triggered
显存满了,关闭jupyter内核,重新启动。原创 2023-05-25 16:07:03 · 147 阅读 · 0 评论 -
torch.repeat()、torch.repeat_interleave()和torch.expand()
torch.repeat()、torch.repeat_interleave()和torch.expand()原创 2023-05-06 19:12:54 · 570 阅读 · 0 评论 -
pytorch矩阵乘法总结
Pytorch 矩阵乘法总结原创 2023-05-06 16:57:53 · 826 阅读 · 0 评论 -
nn.Embedding(num_embeddings, embedding_dim, padding_idx)
【代码】nn.Embedding(num_embeddings, embedding_dim, padding_idx)原创 2023-04-09 11:30:29 · 198 阅读 · 0 评论 -
Mac m1 torch.argmax 只返回 -9223372036854775
Mac m1 torch.argmax 只返回 -9223372036854775原创 2023-04-05 21:01:22 · 88 阅读 · 0 评论 -
PyTorch升维和降维
PyTorch升维和降维原创 2023-01-12 22:39:47 · 2480 阅读 · 0 评论 -
PyTorch 交叉熵损失函数内部原理简单实现
PyTorch 交叉熵损失函数内部原理简单实现原创 2022-12-05 15:35:11 · 596 阅读 · 0 评论 -
PyTorch读取数据集精度 float32, mat1 and mat2 must have the same dtype
简单来说,type(xy) =, dtype=‘float 64’但是,y_pred.dtype = float32,类型冲突。所以,但凡是np类型的数据,做一个类型转换即可。原创 2022-12-04 20:29:44 · 8332 阅读 · 0 评论