- 博客(12)
- 收藏
- 关注
原创 Llama3 Fastapi部署调用debug
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:2
2024-12-23 15:31:04
340
原创 debug:TypeError: Feature names are only supported if all input features have string names, but your
一个bug卡了我好几天,写个文档记录一下处理过程,我个人思考的也不是很清楚,仅用做记录,希望日后能更深入的解决。
2024-11-30 16:31:56
843
原创 一次成功迅速的解决bug:Expected all tensors to be on the same device, but found at least two devices
通过阅读报错说明,里面讲了问题出自该行: logits = model(input_tensor)[:, -1, :] # Logits of the last output token。将问题行 logits = model(input_tensor)[:, -1, :] 的model和input_tensor全部转移device。因此检查该行的输入的设备情况,将tensor类型的input移动到device上,注意:只有tensor类型的可以打印device和移动device,
2024-11-06 15:18:23
369
原创 手搓GPT2模型:以一个文本生成器为例
token embedding + position embedding ——dropout——transformer block——LayerNorm——输出头(将embedding维的数据转化vocabulary维的数据)
2024-10-15 16:06:30
1042
原创 Self-attention公式推导及代码整理
文章是整理的如何不费力的理解self-attention公式的方法,以及如何理解其中的代码这是文章结构,按照如下流程:简化版self-attention(无矩阵权重)——self-attention——Causal attention——Multi-head attention就可以掌握self-attention及其变种的由来。
2024-10-14 17:16:55
1116
原创 Python中import自定义包/模块出错的debug
作者在使用from... import...调用时,出现了ImportError cannot name
2024-04-20 15:52:29
1025
1
翻译 CEBRA算法浅析——如何读取小鼠视觉皮层电影
多年以来,大脑如何生成和理解视觉信息,一直都是神经科学领域的热门研究课题之一。而在这个领域中,有一个问题备受关注,就是:分析大脑信号能否重建一个人所看到的东西。近日,瑞士洛桑联邦理工学院科学家利用人工智能(AI)采集小鼠的神经活动数据,从中解析出此前给小鼠反复观看的电影片段。难道读心术真的走入现实?
2023-05-22 21:38:13
939
6
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人