zzzyq / Depth-Map-Prediction-with-Multi-Scale-Deep-network

17 stars 7 forks source link

Question about the main.py (train_fine) #1

Open Scienceseb opened 6 years ago

Scienceseb commented 6 years ago

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.