Skip to content

ValueError: not enough values to unpack (expected 2, got 1):————out, train_out = model(im) if compute_loss else (model(im, augment=augment), None)  #9397

@JiannBai

Description

@JiannBai

Search before asking

Question

 When I was training my own dataset using train.py scripts, this error occurred during the validation phase:out, train_out = model(im) if compute_loss else (model(im, augment=augment), None) ;ValueError: not enough values to unpack (expected 2, got 1)。
This is the code of the val.py that reported the error:

# Inference with dt[1]: out, train_out = model(im) if compute_loss else (model(im, augment=augment), None)

Why return one less value?

Additional

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleStale and schedule for closing soonquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions