问题
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:
But when I change the size to something larger ( 2 or more) the results are terrible:
Tensorboard shows the diference in the loss. Clearly the the net with batchsize 2 is not minimizing the loss (blue)
Any ideas on why this could be the case?
回答1:
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.
I changed that line in the code and everything is working as expected.
来源:https://stackoverflow.com/questions/50239137/tensorflow-for-image-segmentation-changing-minibatch-size-stops-learning