Skip to contents

Is an object a torch tensor?

Usage

is_torch_tensor(x)

Arguments

x

an object to test.

Value

a logical.

Examples

is_torch_tensor(matrix(1:4, 2, 2))
#> [1] FALSE