loss = train_fine(fine_net,coarse_net,criterion,optimizer_fine,dataset_loader,5,**
Why do you put in comment (aka inactive) the part about the loss in the fine-net section? How the lost about that part is count if you just compute loss = train_coarse(coarse_net,criterion,optimizer_coarse,dataset_loader,5,1) ?
In the def main: def main(): dataset = data(root_dir='./',transform=transforms.Compose([ Rescale((input_height, input_width),(output_height, output_width)), ToTensor()])) dataset_loader = DataLoader(dataset, batch_size=4, shuffle=True, num_workers=0) coarse_net = coarseNet() optimizer_coarse = optim.SGD(coarse_net.parameters(), lr=0.01) criterion = nn.MSELoss() fine_net = fineNet() optimizer_fine = optim.SGD(fine_net.parameters(), lr=0.01) loss = train_coarse(coarse_net,criterion,optimizer_coarse,dataset_loader,5,1) **#show_img(iter(dataset_loader).next())
loss = train_fine(fine_net,coarse_net,criterion,optimizer_fine,dataset_loader,5,**
Why do you put in comment (aka inactive) the part about the loss in the fine-net section? How the lost about that part is count if you just compute loss = train_coarse(coarse_net,criterion,optimizer_coarse,dataset_loader,5,1) ?
Thanks a lot for you help.