Please, it’s not  a matter of random using that function.
Inputs to neworks must be tensors. Once you get the output or any feature you want to work over using numpy (if and only if it’s a torch tensor), you can apply that operator to convert it to a numpy array.
torchtensor.cpu().numpy()
torchtensor.numpy() if it’s already allocated in cpu