Bug
门萨程序媛
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
torch.einsum 简单介绍计算流程
torch.einsum >>> a = torch.arange(60.).reshape(5,3,4) >>> b = torch.arange(24.).reshape(3,4,2) >>> o = torch.einsum('fnd,ndh->fh', a, b) >>> o tensor([[1012., 1078.], [2596., 2806.], [4180., 4534.],原创 2021-05-18 10:53:48 · 710 阅读 · 0 评论 -
pytorch bug: a leaf Variable that requires grad has been used in an in-place operation
pytorch 写的好好的代码运行到某一块突然显示 a leaf Variable that requires grad has been used in an in-place operation 这个bug的意思是 需要梯度的叶子变量被用在了原位操作里 指的是 如果是原位操作,就会覆盖原来的值。 因为并不是计算过程,是赋值,梯度是多少这个没有一个定义(或许是一个跳变过程,梯度无穷大)。 所以...原创 2019-08-27 21:45:35 · 2407 阅读 · 0 评论
分享