seung-lab / znn-release

Multi-core CPU implementation of deep learning for 2D and 3D sliding window convolutional networks (ConvNets).
GNU General Public License v3.0
94 stars 33 forks source link

Divide by zero #31

Closed torms3 closed 9 years ago

torms3 commented 9 years ago

https://github.com/seung-lab/znn-release/blob/v4python/python/ZNN_Dataset.py#L612

In output patch-based rebalancing, we should explicitly handle divide-by-zero when computing class-specific weights. It's possible that an output patch inclues one of the classes exclusively, and the probability of this increases as the output patch size decreases.