RabbitMQ概念及注意点#
构建Dataset子类下面我们构建一下Dataset的子类,叫他MyDataset类:import torchfrom torch.utils.data import Dataset,DataLoaderclass MyDataset(Dataset):def init(self):self.data = torch.tensor([[1,2,3],[2,3,4],[3,4,5],[4,5,6]])self.label = torch.LongTensor([1,1,0,0])def __g