To my understand:
np.corrcoef(x,y)

will return a ndarray type value.
torch.from_numpy(ndarray) → Tensor

This function requires a ndarray type
Can you print out the value of these codes below:
np.corrcoef(predFeats.cpu().numpy().astype(np.float32), targetFeats.cpu().numpy().astype(np.float32))[1][1])

to check out where is the problem.
Because your error shows that this function returns a numpy.float64 rather than a numpy array