Returns the type from applying the Keras type promotion rules.
tf.keras.backend.result_type(
*dtypes
)
In general, each argument is first parsed by backend.standardize_dtype,
and the resulting dtype is determined by the least upper bound of the type
promotion lattice.
Args
dtypes
Input dtypes.
Returns
The result dtype.
Examples:
x = keras.ops.ones((1,), dtype="bfloat16")keras.backend.result_type(x.dtype, int)"bfloat16"
x = keras.ops.ones((1,), dtype="int32")y = keras.ops.ones((1,), dtype="float32")keras.backend.result_type(x.dtype, y.dtype)"float32"
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-06-07 UTC."],[],[]]