Assuming you're doing it in a loop, I'd say it is better to do like this: import torch batch_input, batch_output = [], [] for i in ...
確定! 回上一頁