I guess you are using a numpy array, which returns an int when accessing the size attribute, while PyTorch tensors provide a size() method, which would return the size of the tensor:
a = np.random.randn(3, 2)
print(a.size)
> 6
print(a.size())
> TypeError: 'int' object is not callable

so you could transform the numpy array to a tensor.