Skip to content

UnboundLocalError when training without validation set #15

@JFHoelscher

Description

@JFHoelscher

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions