Depending how you are loading the data (eager or lazily) you might be able to check the number of elements the entire data holds and calculate the size with it.
Currently you might be checking the size of the Python object itself.
If I understand your use case correctly, you are interested to see how much memory a batch would use?
If so, this should work:
# get the batch from the DataLoader
batch = torch.randn(16, 3, 224, 224)
print('{}MB'.format(batch.nelement() * batch.element_size() / 1024**2))
> 9.1875MB