as.vector.torch_tensor attempts to coerce a torch_tensor into a vector of
mode mode (the default is to coerce to whichever vector mode is most convenient):
if the result is atomic all attributes are removed.
# S3 method for torch_tensor
as.vector(x, mode = "any")(torch_tensor) A torch tensor
(character) A character string with one of possible vector modes:
"any", "list", "expression" or other basic types like "character", "integer" etc.
A vector of desired type. All attributes are removed from the result if it is of an atomic mode, but not in general for a list result.