Torch 中 ipGaussian 和 ipWeighedGaussian 的 BUG。

来源:互联网 发布:淘宝的结算方式 编辑:程序博客网 时间:2024/05/16 14:47

在 ipGaussian.h  和 ipWeighedGaussian.h 中添加定义 int _size;


在 ipGaussian.cc 和 ipWeighedGaussian.cc 的

halfsize = (int) ceil((float) size/2);
sigma = (real)size/5;

后添加  

 _size = halfsize * 2 + 1;


再把下文所有的 size 替换成 _size 即可。