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

 



 

相关文章:

  • 2021-12-05
  • 2021-08-31
  • 2021-11-03
  • 2021-04-02
  • 2021-07-29
  • 2021-09-04
  • 2022-12-23
猜你喜欢
  • 2021-11-19
  • 2021-10-29
  • 2021-05-04
  • 2021-12-26
  • 2021-10-23
  • 2021-12-22
相关资源
相似解决方案