ddbourgin / numpy-ml

Machine learning, in numpy
https://numpy-ml.readthedocs.io/
GNU General Public License v3.0
15.35k stars 3.72k forks source link

neural_nets/utils/utils.py line 797 has a bug! #32

Closed real-zhangzhe closed 5 years ago

real-zhangzhe commented 5 years ago

hi, I think neural_nets/utils/utils.py line 797 has a bug!

your code

i0, i1 = i s, (i s) + fr (d + 1) - d j0, j1 = j s, (j s) + fc (d + 1) - d

right code

i0, i1 = i s, (i s) + fr j0, j1 = j s, (j s) + fc

because fr and fc are already dilated size !

ddbourgin commented 5 years ago

Thanks for this @Z-zhe! Sorry I haven't had a chance to take a look at this -- I will shortly :)

ddbourgin commented 5 years ago

Hi @Z-zhe - just checking in to see why this was closed. Did you decide it's not a bug after all? Happy to take a look if you still think there's an error!

real-zhangzhe commented 5 years ago

Sorry, this is a misoperation. Please check your code to fix this bug, thanks!

ddbourgin commented 5 years ago

Hi @Z-zhe - finally had a look at this, and you're right! Will update the code momentarily :)

ddbourgin commented 5 years ago

Fixed - see https://github.com/ddbourgin/numpy-ml/commit/3bef55558d0142a2903d5f98b27a7572e17ddbcc. Thanks @Z-zhe! Closing.