pytorch
文章平均质量分 53
NOVAglow646
pku信科智能系本科 pku智能学院直博一年级
展开
-
利用baukit获取LLM中间层输入输出、修改中间层输出
注意,修改后会影响模型的前传。即,模型获取某一层的输出ouput,然后将output传给自定义的函数进行修改,然后返回一个新的output传给模型的下一层。原创 2024-04-24 16:08:43 · 307 阅读 · 0 评论 -
安装torch-sparse报错error: command ‘/usr/local/cuda-11.1/bin/nvcc‘ failed with exit status 1
注意:我的cuda版本是12.0,torch==1.10.1,下载whl文件,然后pip install。原创 2023-09-11 10:16:54 · 825 阅读 · 0 评论 -
【pytorch笔记】在with torch.no_grad()中临时允许记录梯度
【代码】【pytorch笔记】在with torch.no_grad()中临时允许记录梯度。原创 2023-03-25 17:33:22 · 146 阅读 · 0 评论 -
【pytorch坑点】前向传播会不断积累显存占用,直到反向传播才会释放
如果多次进行forward计算,而不进行backward,那么前向传播时产生的中间结果会一直积累在gpu中。原创 2023-03-14 16:15:31 · 643 阅读 · 0 评论 -
【Pytorch笔记】使用Tensor作为索引
使用tensor作为索引原创 2022-11-06 17:24:57 · 2589 阅读 · 0 评论 -
【Pytorch坑点集合】
1. One of the differentiated Tensors appears to not have been used in the graph解决办法原创 2022-10-23 10:48:03 · 2881 阅读 · 0 评论 -
【Pytorch笔记】查看网络中某一层反向传播的梯度
查看网络中某一层的反向传播的梯度的方法原创 2022-09-30 11:12:18 · 2039 阅读 · 0 评论