Hi, I am trying to get predicted results after model training. Since the input data is too large to fit into memory, I would need to divide the data into batches for evaluation. I know it is possible to do the following in pytorch:
with torch.no_grad():
result_list = []
for batch in dataloader:
result = net(batch)
result_list.append(result)
# then concatenate list to get predicted results
I am just wondering if there are simpler ways to do this, something like mode.predict(input, batch_size=batch_size)
in Keras where batch_size
option automatically takes care of the splitting and recombination process?
Thank you!