torch_scalar_tensor {torch} | R Documentation |
Scalar tensor
Description
Creates a singleton dimension tensor.
Usage
torch_scalar_tensor(value, dtype = NULL, device = NULL, requires_grad = FALSE)
Arguments
value |
the value you want to use |
dtype |
( |
device |
( |
requires_grad |
(bool, optional) If autograd should record operations on the returned tensor. Default: |
[Package torch version 0.13.0 Index]