koichiro11 / residual-attention-network

94 stars 24 forks source link

met error #4

Open zhaobingbingbing opened 6 years ago

zhaobingbingbing commented 6 years ago

Hey,when I run this code there is an error File "/home/user/anaconda3/envs/tf1.4/lib/python3.6/site-packages/tensorflow/python/layers/base.py", line 1224, in __init__ layer.outbound_nodes.append(self) AttributeError: 'UpSampling2D' object has no attribute 'outbound_nodes' Do you know how to fix it? Thank you .

NatalieZou commented 6 years ago

@zhaobingbingbing I met the same error , do you solve it?

CRazorback commented 6 years ago

@koichiro11 So do I. Traceback (most recent call last): File "C:\Users\MSI-PC\Documents\GitHub\residual-attention-network\train.py", line 31, in y = model.f_prop(x) File "C:\Users\MSI-PC\Documents\GitHub\residual-attention-network\model\residual_attention_network.py", line 44, in f_prop x = self.attention_module.f_prop(x, input_channels=64, scope="attention_module_1", is_training=is_training) File "C:\Users\MSI-PC\Documents\GitHub\residual-attention-network\model\attention_module.py", line 89, in f_prop output_soft_mask = tf.layers.conv2d(output_soft_mask, filters=input_channels, kernel_size=1) File "C:\Users\MSI-PC\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\layers\convolutional.py", line 621, in conv2d return layer.apply(inputs) File "C:\Users\MSI-PC\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\layers\base.py", line 828, in apply return self.call(inputs, *args, **kwargs) File "C:\Users\MSI-PC\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\layers\base.py", line 787, in call input_tensors=inputs, output_tensors=outputs, arguments=user_kwargs) File "C:\Users\MSI-PC\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\layers\base.py", line 864, in _add_inbound_node arguments=arguments) File "C:\Users\MSI-PC\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\layers\base.py", line 1376, in init layer.outbound_nodes.append(self) AttributeError: 'UpSampling2D' object has no attribute 'outbound_nodes'

alyato commented 6 years ago

hi,i meet the same error. how to fix it? thanks python's version is 2.7

sankin1770 commented 6 years ago

Maybe you could try _outbound_nodes

Albert337 commented 6 years ago

hi,i meet the problem too.Is there anyone who sloved it?I would be appreciated if you'd like to help me.

zhuobielindesamoye commented 5 years ago

@zhaobingbingbing I met the same error , do you solve it?

Hey,when I run this code there is an error File "/home/user/anaconda3/envs/tf1.4/lib/python3.6/site-packages/tensorflow/python/layers/base.py", line 1224, in __init__ layer.outbound_nodes.append(self) AttributeError: 'UpSampling2D' object has no attribute 'outbound_nodes' Do you know how to fix it? Thank you .

i try to use keras.version=2.0.9,maybe it can help u.But i met another error. Traceback (most recent call last): File "F:/residual-attention-network-master/train.py", line 39, in print("train_X: {shape}".format(shape=train_X.shape)) AttributeError: 'dict' object has no attribute 'shape' how to fix it .thanks

xiaohujecky commented 5 years ago

change the File "/home/user/anaconda3/envs/tf1.4/lib/python3.6/site-packages/tensorflow/python/layers/base.py", line 1224, in init layer.outbound_nodes.append(self) to layer._outbound_nodes.append(self)