pytorch:分批训练
在这里插入代码import torchimport torch.utils.data as Data#批处理模块torch.manual_seed(1) # reproducibleBATCH_SIZE = 5#每小批5个# BATCH_SIZE = 8x = torch.linspace(1, 10, 10) # this is x data (torch tensor)y = torch.linspace(10, 1, 10) # this is y da