SSD测试训练数据出现的问题

1. TypeError: '>' not supported between instances of 'builtin_function_or_method' and 'int'

SSD测试训练数据出现的问题

 

 

解决方法

~/caffe/python/caffe$ vim model_libs.py

   将assert len > 0注释掉变成下面,16行

#assert int(len) > 0

2. TypeError: 1.0 has type float, but expected one of: int, long

SSD测试训练数据出现的问题

 

 

 解决方法

vim model_libs.py

156行(vim中输入,156gg可以快速到达156行)

pad = int((3 + (dilation - 1) * 2) - 1) / 2
改为
pad = int((3 + (dilation - 1) * 2) - 1) // 2

375行

pad = int((kernel_size + (dilation - 1) * (kernel_size - 1)) - 1) / 2
改为
pad = int((kernel_size + (dilation - 1) * (kernel_size - 1)) - 1) // 2

417行

pad = int((kernel_size + (dilation - 1) * (kernel_size - 1)) - 1) / 2
改为
pad = int((kernel_size + (dilation - 1) * (kernel_size - 1)) - 1) // 2

 



 

上一篇:EasyNVR RTSP转RTMP-HLS-FLV流媒体服务器前端构建之:bootstrap弹窗功能的实现


下一篇:OpenCV 机器视觉入门精选 100 题(附 Python 代码)