Hi, I am trying to assess how much time my code takes to acquire the input (with data augmentation). Currently I am using Pytorch’s dataloader. I started recording the time immediately after __getitem__ method till it returned a batch. Is it the right way to assess the time?
My code looks something like this:
def __getitem__(self, idx):
    ts = time.time()
......
......
print("time elapsed for inputs{}s".format(time.time() - ts))
   return batch