- 博客(12)
- 问答 (1)
- 收藏
- 关注
原创 错误记录:RuntimeError: one of the variables needed for gradient computation has been modified by an inpl
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [2, 256, 20, 20]], which is output 0 of struct torch::autograd::CopySlices, is at version 3; expected version 1 instead.
2022-11-17 15:28:57 835 6
原创 错误记录:RuntimeError: Output 0 of SelectBackward0 is a view and is being modified inplace
RuntimeError: Output 0 of SelectBackward0 is a view and is being modified inplace. This view is the output of a function that returns multiple views. Such functions do not allow the output views to be modified inplace. You should replace the inplace opera
2022-11-16 17:02:00 2061
原创 RuntimeError: expected scalar type Half but found Float
经过:在注意力模块中,会有较多的矩阵运算,在训练时出现了cuda和cup类型的冲突(另一篇我写的文章);而在验证时出现了上述错误。出错的位置在torch.bmm()处,在这里进行了一次矩阵乘法运算。由于两个数据的类型不同,因此发生冲突。解决方案:仍然是用to()方法,修改数据类型为另一个数据的类型。起因:将CCNet的十字交叉注意力模块移植到YOLOv5中。
2022-11-09 11:37:21 8929 1
原创 RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 错误记录和应该通用的解决方案
2022-11-09 10:55:29 718 1
原创 ArcGIS for JS---PopupTemplate for Feature
本文主要介绍如何获取弹窗内容里面的动态数据,同时也简单的展示如何设置地图弹窗
2022-07-29 12:56:50 778
原创 [Vue warn]: Invalid prop: type check failed for prop “value“. Expected String, Number, got Array
获取在arcgis地图上绘制的多边形的坐标,这些坐标以二维数组的形式存在;我将二维数组赋给form对象的一个属性,form与绑定,每次执行到相关代码时,就会报错,说属性不能是数组,只能是string 或 number。解决方法:“对对对,你说的都对,我改就是了”——将二维数组改为string类型,再将这个string类型的数据赋值给form对象的某个属性。...
2022-06-15 13:30:18 828
原创 ArcGIS地图--Vue开发--外部按钮与地图控件交互
任务一:浏览器页面--左边显示片区列表,右边显示地图方法:准备三个容器,第一个为总容器,覆盖整个页面;第二个和第三个为第一个容器的子容器,各自占据页面左右两边。任务二:1.点击列表的新增按钮后,可以在地图上绘制新片区;2.片区绘制完毕时,左边片区列表处弹出新增卡片,卡片中可以填写新增的片区名和备注信息,同时显示不可编辑的片区坐标数组;3.点击确认创建后,提示创建信息,如果创建成功,刷新片区列表,显示新增片区后的列表。关键方法:在创建地图的方法中,设置“新增”按钮的监听事件,在监听事件中,调用地图绘...
2022-06-15 09:58:08 631
原创 MiXFormer--PyTorch复现
文章:MixFormer: Mixing Features across Windows and Dimensions (CVPR 2022 Oral)原文章的代码实现是在paddlepaddle平台上;我在 @太阳花的小绿豆 的SwinTransformer的基础上更改了一些代码实现的。关键代码如下:model.pyimport torchimport torch.nn as nnimport torch.nn.fun...
2022-05-31 15:33:31 1804 17
原创 ValueError: Invalid type <class ‘numpy.int32‘> for the flop count,Please use a wider type to avoid
ValueError: Invalid type <class 'numpy.int32'> for the flop count! Please use a wider type to avoid
2022-05-26 09:35:25 1695 2
空空如也
ArcGIS的view.goTo()无法将视角移到指定的位置
2022-07-31
TA创建的收藏夹 TA关注的收藏夹
TA关注的人