as_tensor | R Documentation |
Coerce objects to tensorflow tensors (potentially of a specific dtype or shape). The
provided default methods will call
tf$convert_to_tensor
. Depending on arguments supplied it may also call some combination of
as_tensor(x, dtype = NULL, ..., name = NULL) ## Default S3 method: as_tensor(x, dtype = NULL, ..., shape = NULL, name = NULL) ## S3 method for class 'double' as_tensor(x, dtype = NULL, ..., name = NULL)
x |
object to convert |
dtype |
|
..., |
ignored |
name |
|
shape |
an integer vector, tensor, or |
a tensorflow tensor
## Not run: as_tensor(42, "int32") as_tensor(as_tensor(42)) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.