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

Typo in analyze.py #22

Open
JamesMDe opened this issue Apr 21, 2020 · 1 comment
Open

Typo in analyze.py #22

JamesMDe opened this issue Apr 21, 2020 · 1 comment

Comments

@JamesMDe
Copy link

JamesMDe commented Apr 21, 2020

Hello,

My coworker and I were trying to run analyze.py and received the following error:

Traceback (most recent call last):
File "analyze.py", line 106, in
y_pred, y_test = predict('data/valid', model)
File "analyze.py", line 44, in predict
class_id = int(tokens[-2])
IndexError: list index out of range

It appears that os.pathsep that is passed into the split function on line 44 in analyze.py is using a ':' as a delimiter instead of a '/'. Replacing this with os.path.sep fixes the issue.

@Usman-Ghani123
Copy link

Usman-Ghani123 commented Apr 22, 2020

Use this instead of the one in the code it will solve the problem.
tokens=img_path.split('\')

(Use back Slash twice)

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