ultrasound-nerve-segmentation icon indicating copy to clipboard operation
ultrasound-nerve-segmentation copied to clipboard

about merge

Open lz666win opened this issue 6 years ago • 4 comments

I notice that you use merge to concat 4 layer,like this: res = merge([c1_1, c2_3, c3_3, c4_2], mode='concat', concat_axis=1) but as I know ,merge can only concat 2 layers,and the first 2 layers have different shape,error shows like: ValueError: "concat" mode can only merge layers with matching output shapes except for the concat axis. Layer shapes: [(None, 1, 80, 8), (None, 1, 80, 16), (None, 1, 80, 4), (None, 1, 80, 4)] I do not know why you concat different shape like that.

lz666win avatar Jun 28 '18 03:06 lz666win

I change to 'channels_last',here the error: ValueError: "concat" mode can only merge layers with matching output shapes except for the concat axis. Layer shapes: [(None, 80, 112, 8), (None, 80, 112, 16), (None, 80, 112, 4), (None, 80, 112, 4)]

lz666win avatar Jun 28 '18 05:06 lz666win

Hi, maybe new keras version behaves differently ? I suspect that something in the conv mechanism could have changed (i.e. padding, some default values of other parameters). I recommend tracing layer by layer and discover what happens to tensor size at each step and find the culprit.

EdwardTyantov avatar Jun 28 '18 07:06 EdwardTyantov

I find slice_X and flip_axis and many others functions was disappear in my keras(2.2.0),what version did you use?how can I take place your version to my local?

lz666win avatar Jun 28 '18 09:06 lz666win

1.0.7

EdwardTyantov avatar Jun 29 '18 11:06 EdwardTyantov