
bug记录
一个记录解决了的bug的地方
白刃的阿白
这个作者很懒,什么都没留下…
展开
-
C++ onnxruntime 报错Ort::Exception: tried creating tensor with negative value in shape
C++ onnxruntime 报错Ort::Exception: tried creating tensor with negative value in shape1. 环境与配置MacOS C++环境 onnxruntime1.10.0(brew安装)2.报错情形使用pytorch导出的 .onnx模型文件,其动态轴设定如下: input = torch.randn(1, 3, 736, 736) dynamic_axes = {'images': {2: 'height',原创 2022-04-12 20:03:24 · 2732 阅读 · 2 评论 -
训练CTPN报错IndexError: list index out of range
训练CTPN报错 IndexError: list index out of range训练CTPN的时候有些图片报这个错。出错代码如下。因为在减均值的时候是三个通道分别减去三个均值,某些图片是两个通道的,长度不匹配所以报错了。解决:转换为RGB三通道图 在这 vggMeans = [122.7717, 102.9801, 115.9465] imageList = cv2.split(image.astype(np.float32)) # 分离通道 imageList[0]原创 2021-11-17 17:16:07 · 600 阅读 · 0 评论 -
ValueError: cannot reshape array of size xx into shape (x,x,x)
ValueError: cannot reshape array of size 571428 into shape (3,351,407)在训练CTPN的时候,数据集处理的 cv2.dnn.blobFromImage 之后的reshape报的这个错。原因是有一张图像它的通道数乘以宽和高等于571428,不等于3 * 351 * 407,因此不能reshape到(3,351,407)。算了一下 571428 = 4 * 351 * 407 ,说明这个图莫名其妙地是个4通道的图像。然后断点找了一下这张图,原创 2021-11-17 16:56:43 · 7489 阅读 · 0 评论