Skip to content

Custom loss demo should be updated #1600

Open
@BreezeHavana

Description

@BreezeHavana

Doc request
A clear and concise description of what you would like to see documented or what is unclear.

After the recent version update, if you define compute_loss in trainer, you need to pass in the parameter num_items_in_batch. But this is not mentioned in the documentation. I hope the documentation can be updated to avoid this confusing error.
https://huggingface.co/docs/transformers/v4.48.2/en/trainer

Additional context
Add any other context or screenshots about the feature request here.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions