torch_promote_types: Promote_types

Description Usage Arguments promote_types(type1, type2) -> dtype Examples

View source: R/gen-namespace.R

Description

Promote_types

Usage

1
torch_promote_types(type1, type2)

Arguments

type1

(torch.dtype)

type2

(torch.dtype)

promote_types(type1, type2) -> dtype

Returns the torch_dtype with the smallest size and scalar kind that is not smaller nor of lower kind than either type1 or type2. See type promotion documentation for more information on the type promotion logic.

Examples

1
2
3
4
5

torch documentation built on Oct. 7, 2021, 9:22 a.m.