facebookresearch / odin

A simple and effective method for detecting out-of-distribution images in neural networks.
Other
526 stars 102 forks source link

Two TabErrors #3

Closed cclauss closed 4 years ago

cclauss commented 6 years ago

Unfortunately, Python 3 treats tab errors as syntax errors...

flake8 testing of https://github.com/facebookresearch/odin on Python 3.6.3

$ _flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./code/cal.py:71:104: E999 TabError: inconsistent use of tabs and spaces in indentation
    testset = torchvision.datasets.CIFAR10(root='../data', train=False, download=True, transform=transform)
                                                                                                       ^
./code/calMetric.py:37:12: E999 TabError: inconsistent use of tabs and spaces in indentation
    start = 0.1
           ^
2     E999 TabError: inconsistent use of tabs and spaces in indentation
2
kobybibas commented 4 years ago

I solved it by executing: autopep8 -i cal*

cclauss commented 4 years ago

Even better do: black .

https://github.com/psf/black