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

UnboundLocalError when training without validation set #15

Open
JFHoelscher opened this issue Jun 24, 2021 · 0 comments
Open

UnboundLocalError when training without validation set #15

JFHoelscher opened this issue Jun 24, 2021 · 0 comments

Comments

@JFHoelscher
Copy link

File ".../unet/model.py", line 212, in fit_dataset **val_logs, **train_logs} UnboundLocalError: local variable 'val_logs' referenced before assignment

The val_dataset argument to fit_dataset is optional. However, if none is provided, val_logs is not assigned. Anyway it is referenced, leading to this error.

Suggested fix: Add val_logs = {} to the else clause of if val_dataset is not None: in fit_dataset

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

1 participant