Error: ‘DataLoaderIter’ object has no attribute ‘shutdown’
vishal1796
Without any context, we cannot reply with an answer. What are you looking for, is there a script to reproduce this error?
smth
I am trying to implemen fast neural style. The training function is here <SCODE>for epoch in range(args.epochs):
    for iteration, batch in enumerate(data_loader):
        x = Variable(batch[0])
        x = batch_rgb_to_bgr(x)
        if args.cuda:
            x = x.cuda()
        y_hat = model(x)
        xc = Variable(x.clone())
        optimizer.zero_grad()
        loss = loss_function(args.content_weight, args.style_weight, xc, xs, y_hat)
        loss.backward()
        optimizer.step()
        print("===> Epoch[{}]({}/{}): Loss: {:.4f}".format(epoch, iteration, len(data_loader), loss.data[0]))
    torch.save(model.state_dict(), 'model_{}.pth'.format(epoch))
torch.save(model.state_dict(), 'model.pth')
<ECODE> and the dataloader code <SCODE>train_set = datasets.ImageFolder(args.dataset_path, transform)
data_loader = DataLoader(dataset=train_set, num_workers=args.threads, batch_size=args.batchSize, shuffle=True)
<ECODE>
vishal1796
You can check this by doing: print(len(train_set)) <SCODE>a.png
cat/b.png
dog/c.png
<ECODE> Hope that helps figure out your issue.
smth