Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have created a net for image segmentation, in particular brain tumors. The jupyter notebook with the code is here.

When I train the CNN with minibatch size of 1, I get a fairly good result: enter image description here

But when I change the size to something larger ( 2 or more) the results are terrible: enter image description here

Tensorboard shows the diference in the loss. Clearly the the net with batchsize 2 is not minimizing the loss (blue) enter image description here

Any ideas on why this could be the case?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
196 views
Welcome To Ask or Share your Answers For Others

1 Answer

I found the problem. I checked my graph with tensorboard and I notice that in the CONV1/S1 I was not connecting the output of the ReLu to the next layer (CONV1/S2), instead I was connecting the output of the conv2d directly.

enter image description here

I changed that line in the code and everything is working as expected.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...