Skip to content

InputSizeError

Bases: Exception

Raised when the amount of features being passed to a network does not match with its input size.

Source code in src/safeds/exceptions/_ml.py
class InputSizeError(Exception):
    """Raised when the amount of features being passed to a network does not match with its input size."""

    def __init__(self, data_size: int | ImageSize, input_layer_size: int | ImageSize) -> None:
        super().__init__(
            f"The data size being passed to the network({data_size}) does not match with its input size({input_layer_size}). Consider changing the data size of the model or reformatting the data.",
        )