SSD测试训练数据出现的问题
1. TypeError: '>' not supported between instances of 'builtin_function_or_method' and 'int'
解决方法
~/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
解决方法
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