walkwithfastai / walkwithfastai.github.io

Host for https://walkwithfastai.com
Other
143 stars 53 forks source link

07_Binary_Segmentation.ipynb gives an error ```NameError: name 'p2c' is not defined``` #24

Closed petrov826 closed 3 years ago

petrov826 commented 3 years ago

When running 07_Binary_Segmentation.ipynb, the cell dls = binary.dataloaders(path/'images_data_crop', bs=8) gives an error

<ipython-input-22-cd6c82b0e03c> in <lambda>(o)
----> 1 get_y = lambda o: get_msk(o, p2c)

NameError: name 'p2c' is not defined

I could solve this issue by changing the above cell vals = n_codes(lbl_names) to p2c = n_codes(lbl_names).