torch.randint_like
function randint_like<S extends Shape>(input: Tensor<S>, high: number, options?: RandintLikeOptions): Tensor<S>function randint_like<S extends Shape>(input: Tensor<S>, low: number, high: number, options?: RandintLikeOptions): Tensor<S>Create a tensor with same shape as input filled with random integers.
Parameters
inputTensor<S>- Tensor to match shape from
highnumber- Highest integer (exclusive)
optionsRandintLikeOptionsoptional- Optional settings for randint_like
Returns
Tensor<S>– A new tensor with random integers