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

Why the n_classes is 2? #4

Open
artaasd95 opened this issue Oct 9, 2019 · 1 comment
Open

Why the n_classes is 2? #4

artaasd95 opened this issue Oct 9, 2019 · 1 comment

Comments

@artaasd95
Copy link

Hi,
I tried to train the model using a pixel wise criterion(L1 loss), my input image has 3 channels and since the final conv2d layer is using n_classes(by default is set to 2), for out_channels, the output has 2 channels and the criterion can not compare these images. Why should out_channels should be 2? Can it change to 3?
the code:
self.final = nn.Conv2d(filters[0], n_classes, 1)

@zacario-li
Copy link

@artadp you should not compare the input image with the network's output. compare the network's output with your label.

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

2 participants