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

Black output #3

Open
Sam813 opened this issue May 30, 2018 · 2 comments
Open

Black output #3

Sam813 opened this issue May 30, 2018 · 2 comments

Comments

@Sam813
Copy link

Sam813 commented May 30, 2018

Hi,
I have tried to train the CRFasRNN with my data which are CT medical images. My images consist of two class of background and tumors.
I used the training prototext in this repo and seems the training is going on well, but when I check the prediction of the network on testing images, all are in black.

I read that I have a problem in weight initialization of the convolution/ deconvolution layer, but I don't know how to fix it.
Can anyone please help me on this?

@KleinYuan
Copy link
Owner

@Sam813 refer to this reply

@Sam813
Copy link
Author

Sam813 commented May 31, 2018

@KleinYuan Thanks for the fast response but sorry I don't get what you mean? My loss is reducing in during the training. The problem is that all predictions of the network are in black.
I was wondering what is the problem that all the outputs are black. In
here they mentioned possibly I have not initialized the weights for deconvolution layers correctly.
So may I know how should i initialize it.
below is the way that i did it
layer {
name: "score2-new"
type: "Deconvolution"
bottom: "score"
top: "score2-new"
param {
lr_mult: 1
}
convolution_param {
num_output: 2 #21
kernel_size: 4
stride: 2
weight_filler: { type: "xavier"
std: 0.1
}
bias_filler {
type: "constant"
value: 0.2 }
}
}
So as you see, i changed the number of outputs to 2 and initialize the weights by xavier method.

I have included my train prototext in case it can help.
Looking forward to your assist
Thanks

Train_prototext.txt

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