Open coldgemini opened 6 years ago
this is when using custom dataset with nonuniform image sizes
File "/home/xiangyong/Workbench/RetinaNet-unsky/retinanet/core/metric.py", line 73, in update clsloss = np.sum(-1 alpha labels * np.power(1 - cls+eps, gamma) np.log(cls_+eps) - (1-labels)(1-alpha) np.power(1 - ( 1-cls_)+eps, gamma) np.log( 1-cls_+eps)) ValueError: operands could not be broadcast together with shapes (1,20,123) (1,5,123)
Have you changed your num_classes variable to the number of your custom dataset? You need to change it in both pascal_voc.py file and metric.py file.
this is when using custom dataset with nonuniform image sizes
File "/home/xiangyong/Workbench/RetinaNet-unsky/retinanet/core/metric.py", line 73, in update clsloss = np.sum(-1 alpha labels * np.power(1 - cls+eps, gamma) np.log(cls_+eps) - (1-labels)(1-alpha) np.power(1 - ( 1-cls_)+eps, gamma) np.log( 1-cls_+eps)) ValueError: operands could not be broadcast together with shapes (1,20,123) (1,5,123)