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

calculate_class_weighting.py #4

Closed
ThomasLengeling opened this issue Jun 15, 2017 · 2 comments
Closed

calculate_class_weighting.py #4

ThomasLengeling opened this issue Jun 15, 2017 · 2 comments

Comments

@ThomasLengeling
Copy link

Hi I am following your tutorial to train on the Cityscape dataset.

I am running the following code for the ENet predictions.

python calculate_class_weighting.py --source ENet/dataset/train_fine_cityscapes.txt --num_classes 19 

but i get:

Traceback (most recent call last):
  File "calculate_class_weighting.py", line 48, in <module>
    if ((labels == i).sum()) == 0:
AttributeError: 'bool' object has no attribute 'sum'

thank you

@pedropgusmao
Copy link

@ThomasLengeling , I changed line 48 it to if ( np.sum( (labels == i) ) ) == 0: and it works

@TimoSaemann
Copy link
Owner

Thanks @pedropgusmao

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

3 participants