RuntimeError: Input type (torch.cuda.FloatTensor) and weight type (torch.FloatTensor) should be the
解决:self.dataLoader = DataLoader(VOCDataset(),batch_size=8,shuffle=True,num_workers=1)原因:代码只把数据放入cuda了,而没有把网络放入cuda。原因:批次太大,根据自己硬件情况 调整最大的批次。解决:把网络放入cuda;
原创
2023-05-04 19:49:20 ·
333 阅读 ·
0 评论