TypeError: __init__() got multiple values for argument 'axis'

 
from keras.layers import Input, merge

up2 = merge([UpSampling2D(size=(2, 2))(conv5), conv4], mode='concat', concat_axis=1)

it is showing the following error:

UserWarning: The `merge` function is deprecated and will be removed after 08/2017. Use instead layers from `keras.layers.merge`, e.g. `add`, `concatenate`, etc.
  up1 = merge([UpSampling2D(size=(2, 2))(conv3), conv2], mode='concat', concat_axis=1)
/usr/local/python/3.5.2-gcc4/externalmodules/lib/python3.5/site-packages/keras/legacy/layers.py:456: UserWarning: The `Merge` layer is deprecated and will be removed after 08/2017. Use instead layers from `keras.layers.merge`, e.g. `add`, `concatenate`, etc.
  name=name)

 

The warning is quit clear. You should use kears.layers.merge.concatenate instead of  merge

from keras.layers.merge import concatenate
up2 = concatenate([UpSampling2D(size=(2, 2))(conv5), conv4], axis=1)

请注意是小写c!

你可能感兴趣的:(python)