摘要: torch.utils.data Pytorch提供的对数据集进行操作的函数详见:https://pytorch.org/docs/master/data.html#torch.utils.data.SubsetRandomSampler torch的这个文件包含了一些关于数据集处理的类: clas 阅读全文
posted @ 2019-11-04 11:30 爱学英语的程序媛 阅读(16797) 评论(0) 推荐(0) 编辑
摘要: 报错:invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number 解决方法: That's because in PyTorch>=0.5, the index of 阅读全文
posted @ 2019-11-04 11:26 爱学英语的程序媛 阅读(3881) 评论(0) 推荐(0) 编辑