powered by
Result_type
torch_result_type(tensor1, tensor2)
(Tensor or Number) an input tensor or number
Returns the torch_dtype that would result from performing an arithmetic operation on the provided input tensors. See type promotion documentation for more information on the type promotion logic.
torch_dtype
# NOT RUN { if (torch_is_installed()) { torch_result_type(tensor1 = torch_tensor(c(1, 2), dtype=torch_int()), tensor2 = 1) } # }
Run the code above in your browser using DataLab