Solved by ZimoNitrome in post #2 
              
              
                The following code seems to be quite efficient for my use case: 
# Save tensors each output
netG.eval()
with torch.no_grad():
    pred_val = netG(fixed_target)
netG.train()

f_path = Path(f"./progress/batch_outputs.h5")
if not f_path.exists():
    f = tables.open_file(str(f_path), mode='w')
    atom…