代码
import tqdm
train_loader = DataLoader(
train_dst, batch_size=params['batch_size'], shuffle=True, num_workers=4)
for a in tqdm(train_loader):
print(a['image'].size(), a['label'].size())
报错
for a in tqdm(train_loader):
TypeError: 'module' object is not callable
Process finished with exit code 1
解决
把
import torch
改成
from tqdm import tqdm