1 | initial version |
Yes, there is a bug and it does result in learning when the learning rate is set to zero. Float division by zero is undefined behavior, but after casting to integer it can go to -2^32 for example. The model update intervals may then be set between 0 and a negative number, which I think results in complete learning of the next frame because if you use apply() twice on the same image with learning rate zero it seems you will always get an empty mask.
If you don't want to patch it a temporary solution is to set the learning rate to a very small number.