Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

Failure in trying to reproduce the example notebook provided by the repository. #54

@cae-ins

Description

@cae-ins

Description

When training the model, an IndexError: Target [X] is out of bounds occurs due to a mismatch between the model’s output dimension (num_classes) and the actual number of classes in the dataset.

Steps to Reproduce

Initialize the model with an incorrect num_classes (e.g., smaller than the maximum label index in the dataset).

Train the model on data where labels exceed the declared num_classes - 1.

Error occurs during loss calculation (e.g., cross-entropy).

Error Message

IndexError: Target [X] is out of bounds.  
# (Full traceback pointing to the loss function)  

Expected Behavior

The model should either:

Automatically infer num_classes from the training data.

Throw a clear validation error during initialization if num_classes is misconfigured.

Metadata

Metadata

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