According to the docs:

Converts a PIL Image or numpy.ndarray (H x W x C) in the range [0, 255] to a torch.FloatTensor of shape (C x H x W) in the range [0.0, 1.0] if the PIL Image belongs to one of the modes (L, LA, P, I, F, RGB, YCbCr, RGBA, CMYK, 1) or if the numpy.ndarray has dtype = np.uint8

You could see the difference doing:
numpy_array = np.ones((224,224))
numpy_array_uint8 = np.ones((224,224,1),dtype=np.uint8)
tensor = ToTensor()(numpy_array)
tensor_uint8 = ToTensor()(numpy_array_uint8)
print(tensor)
print(tensor_uint8)

So only is equivalent if the numpy array has dtype = np.uint8