keras-team/keras · error · ValueError

There is no implicit conversions from float8 dtypes to other

Error message

There is no implicit conversions from float8 dtypes to others. You must cast it internally. Received: {dtypes}

What it means

Error "There is no implicit conversions from float8 dtypes to others. You must cast it internally. Received: {dtypes}" thrown in keras-team/keras.

Source

Thrown at keras/src/backend/common/dtypes.py:318

    "bfloat16"

    >>> x = keras.ops.ones((1,), dtype="int32")
    >>> y = keras.ops.ones((1,), dtype="float32")
    >>> keras.backend.result_type(x.dtype, y.dtype)
    "float32"

    >>> z= keras.ops.ones((1,), dtype='complex64')
    >>> keras.backend.result_type(z.dtype, int)
    "float64"

    """
    if len(dtypes) == 0:
        # If no dtypes provided, default to floatx, this matches
        # `ops.convert_to_tensor([])`
        return config.floatx()
    for dtype in dtypes:
        if dtype in FLOAT8_TYPES:
            raise ValueError(
                "There is no implicit conversions from float8 dtypes to others."
                f" You must cast it internally. Received: {dtypes}"
            )
    return _lattice_result_type(
        *(config.floatx() if arg is None else arg for arg in dtypes),
    )

View on GitHub (pinned to 7a34a03db6)

When it happens

Trigger: Thrown at keras/src/backend/common/dtypes.py:318 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of keras-team/keras@7a34a03db6 (2026-08-25). Data as JSON: /api/errors/f9ae6b6e3d15dad2. Report an issue: GitHub.