torch_empty | R Documentation |
Empty
torch_empty(
...,
names = NULL,
dtype = NULL,
layout = NULL,
device = NULL,
requires_grad = FALSE
)
... |
a sequence of integers defining the shape of the output tensor. |
names |
optional character vector naming each dimension. |
dtype |
( |
layout |
( |
device |
( |
requires_grad |
(bool, optional) If autograd should record operations on the returned tensor. Default: |
Returns a tensor filled with uninitialized data. The shape of the tensor is
defined by the variable argument size
.
if (torch_is_installed()) {
torch_empty(c(2, 3))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.