调试MS-G3D程序时
with torch.no_grad():
self.model = self.model.cuda(self.output_device)
self.model.eval()
self.print_log(f'Eval epoch: {epoch + 1}')
for ln in loader_name:
loss_values = []
score_batches = []
step = 0
process = tqdm(self.data_loader[ln], dynamic_ncols=True)
for batch_idx, (data, label, index) in enumerate(process):
data = data.float().cuda(self.output_device)
label = label.long().cuda(self.output_device)
output = self.model(data)
显示进度条为0后结束,不执行后续程序
1.直接在for循环括号里 self.data_loader[ln]
2.num_workers过大,但我设置为0
都没有效果