Tensorboard - ValueError: too many values to unpack (expected 2)
Tensorboard - ValueError: too many values to unpack (expected 2)
我尝试过使用 tensorboard 来可视化模型。我正在关注 pytorch.org tutorial。这是数据加载器的代码。
writer_train = SummaryWriter('runs/training')
train_loader = torch.utils.data.DataLoader(train_dataset, batch_size=config.train_batch_size, shuffle=True,
num_workers=config.num_workers, pin_memory=True)
images, labels = next(iter(train_loader))
writer_train.graph_model(light_net, images)
我在 iter 行中遇到了这个错误。
images, labels = next(iter(train_loader))
ValueError: too many values to unpack (expected 2)
我已经调试了代码并找到了这个。
我尝试过使用 tensorboard 来可视化模型。我正在关注 pytorch.org tutorial。这是数据加载器的代码。
writer_train = SummaryWriter('runs/training')
train_loader = torch.utils.data.DataLoader(train_dataset, batch_size=config.train_batch_size, shuffle=True,
num_workers=config.num_workers, pin_memory=True)
images, labels = next(iter(train_loader))
writer_train.graph_model(light_net, images)
我在 iter 行中遇到了这个错误。
images, labels = next(iter(train_loader)) ValueError: too many values to unpack (expected 2)
我已经调试了代码并找到了这个。