powered by
Fills the input Tensor with the value val.
val
nn_init_constant_(tensor, val)
an n-dimensional Tensor
Tensor
the value to fill the tensor with
if (torch_is_installed()) { w <- torch_empty(3, 5) nn_init_constant_(w, 0.3) }
Run the code above in your browser using DataLab