torchcv icon indicating copy to clipboard operation
torchcv copied to clipboard

random_crop results in image with zero target.

Open chenyuntc opened this issue 8 years ago • 2 comments

random_crop op may crop only background part, which will result in the cls_targets to all be zero. This will raise ZeroDivisionError: float division by zero in here when all item in the batch doesn't include background (num_pos is 0)

chenyuntc avatar Mar 29 '18 04:03 chenyuntc

I am facing this same problem. for now, I have given num_pos very less value, but all my losses are coming zero.

vaishnavm217 avatar Jun 05 '18 05:06 vaishnavm217

@vaishnavm217 & @chenyuntc. Please refer to https://github.com/kuangliu/torchcv/issues/35

ahkarami avatar Jul 07 '18 05:07 ahkarami