Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cls_loss broadcast error #7

Open
coldgemini opened this issue Feb 5, 2018 · 1 comment
Open

cls_loss broadcast error #7

coldgemini opened this issue Feb 5, 2018 · 1 comment

Comments

@coldgemini
Copy link

this is when using custom dataset with nonuniform image sizes

File "/home/xiangyong/Workbench/RetinaNet-unsky/retinanet/core/metric.py", line 73, in update
cls_loss = 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)

@rnsandeep
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants