Returns a tensor filled with uninitialized data.
tch_empty(sizes, dtype = NULL, layout = NULL, device = NULL, requires_grad = FALSE)
sizes | a sequence of integers defining the shape of the output tensor. |
---|---|
dtype | the desired data type of returned tensor. Default: if |
device | the desired device of returned tensor. Default: if |
requires_grad | If autograd should record operations on the
returned tensor. Default: |
the | desired layout of returned Tensor. Default: 'strided' |
The shape of the tensor is defined by the variable argument sizes.
#> tensor #> 1e-10 * #> 0.0000 4.6566 #> -2870932006835.9375 0.0000 #> [ Variable[CPUFloatType]{2,2} ]