Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

when I run the LUNA_train_unet.py, I get an error. #17

Open
eshinesimida opened this issue May 9, 2017 · 3 comments
Open

when I run the LUNA_train_unet.py, I get an error. #17

eshinesimida opened this issue May 9, 2017 · 3 comments

Comments

@eshinesimida
Copy link

run the codes:
up6 = merge([UpSampling2D(size=(2, 2))(conv5), conv4], mode='concat', concat_axis=1)
conv6 = Convolution2D(256, 3, 3, activation='relu', border_mode='same')(up6)
conv6 = Convolution2D(256, 3, 3, activation='relu', border_mode='same')(conv6)

I get an error:
up6 = merge([UpSampling2D(size=(2, 2))(conv5), conv4], mode='concat', concat_axis=1)
conv6 = Convolution2D(256, 3, 3, activation='relu', border_mode='same')(up6)
conv6 = Convolution2D(256, 3, 3, activation='relu', border_mode='same')(conv6)

d:\Program Files\Anaconda3\lib\site-packages\spyder\utils\ipython\start_kernel.py:1: 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.

-- coding: utf-8 --

d:\Program Files\Anaconda3\lib\site-packages\keras\legacy\layers.py:460: 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)
Traceback (most recent call last):

File "", line 1, in
up6 = merge([UpSampling2D(size=(2, 2))(conv5), conv4], mode='concat', concat_axis=1)

File "d:\Program Files\Anaconda3\lib\site-packages\keras\legacy\layers.py", line 460, in merge
name=name)

File "d:\Program Files\Anaconda3\lib\site-packages\keras\legacy\layers.py", line 121, in init
self(input_tensors, mask=input_masks)

File "d:\Program Files\Anaconda3\lib\site-packages\keras\engine\topology.py", line 585, in call
output = self.call(inputs, **kwargs)

File "d:\Program Files\Anaconda3\lib\site-packages\keras\legacy\layers.py", line 214, in call
return K.concatenate(inputs, axis=self.concat_axis)

File "d:\Program Files\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py", line 1681, in concatenate
return tf.concat([to_dense(x) for x in tensors], axis)

File "d:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\ops\array_ops.py", line 1075, in concat
dtype=dtypes.int32).get_shape(

File "d:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 669, in convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)

File "d:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\framework\constant_op.py", line 176, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)

File "d:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\framework\constant_op.py", line 165, in constant
tensor_util.make_tensor_proto(value, dtype=dtype, shape=shape, verify_shape=verify_shape))

File "d:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\framework\tensor_util.py", line 367, in make_tensor_proto
_AssertCompatible(values, dtype)

File "d:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\framework\tensor_util.py", line 302, in _AssertCompatible
(dtype.name, repr(mismatch), type(mismatch).name))

TypeError: Expected int32, got list containing Tensors of type '_Message' instead.

could you help me. thank you

@alejosv
Copy link

alejosv commented Jun 1, 2017

Possible solution here

@wushuo1997
Copy link

you could try' pip install keras==2.1.2'
since there is not a merge function in keras 2.2.4
and it works for me.
good luck

@aszhanghuali
Copy link

@wushuo1997 Hi!Did you run classify_nodes.py successfully ?
I run this successfully ,but It's all 0 in dataY.npy. Why is there no 1?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants