Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

which parameter did you set during the train ? #3

Open
vanillaHill opened this issue Dec 5, 2018 · 4 comments
Open

which parameter did you set during the train ? #3

vanillaHill opened this issue Dec 5, 2018 · 4 comments

Comments

@vanillaHill
Copy link

Hello,
I've trained it with the places365_standard, with batch_size=16, the mask that you mentionned on the issue #1 and the other parameters by default.
But i didn't get that interesting results.
Could you tell me what parameters did you put to get the results that you show in your video?

@erhuodaosi
Copy link

Hello,
I've trained it with the places365_standard, with batch_size=16, the mask that you mentionned on the issue #1 and the other parameters by default.
But i didn't get that interesting results.
Could you tell me what parameters did you put to get the results that you show in your video?
Hi,I think the solution to the problem is that you could train more steps or you could use the model the author given,you could compare with them,maybe you could change the loss weight,they are different with the original paper,wish you could get the wonderful results as the videos.

I have a question,while training the model,have you met such similar question:
(py3) [fl@ibcu05 place2]$ python train.py
Loaded training dataset with 1434892 samples and 55116 masks
Loaded model to device...
Setup Adam optimizer...
Setup loss function...

EPOCH:0 of 3 - starting training loop from iteration:0 to iteration:89680

0%| | 0/89680 [00:00<?, ?it/s]
Traceback (most recent call last):
File "train.py", line 141, in
loss_dict = loss_func(image, mask, output, gt)
File "/home/fl/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "/home/fl/place2/loss.py", line 94, in forward
loss_dict["tv"] = total_variation_loss(composed_output, self.l1) * LAMBDAS["tv"]
File "/home/fl/place2/loss.py", line 50, in total_variation_loss
loss = l1(image[:, :, :, :-1] - image[:, :, :, 1:]) + l1(image[:, :, :-1, :] - image[:, :, 1:, :])
File "/home/fl/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
TypeError: forward() missing 1 required positional argument: 'target'

I would very appreciate if you could help me, thank you!

@erhuodaosi
Copy link

Hi,I think the solution to the problem is that you could train more steps or you could use the model the author given,you could compare with them,maybe you could change the loss weight,they are different with the original paper,wish you could get the wonderful results as the videos.

@chen849157649
Copy link

@erhuodaosi
loss function error, modify :
def total_variation_loss(image):
# shift one pixel and get difference (for both x and y direction)
loss = torch.mean(torch.abs(image[:, :, :, :-1] - image[:, :, :, 1:])) +
torch.mean(torch.abs(image[:, :, :-1, :] - image[:, :, 1:, :]))
return loss

@erhuodaosi
Copy link

@chen849157649
Forgive me for seeing the information today.And the program could run perfectly!Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants