MathiasGruber / PConv-Keras

Unofficial implementation of "Image Inpainting for Irregular Holes Using Partial Convolutions". Try at: www.fixmyphoto.ai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AttributeError: 'Node' object has no attribute 'output_masks'

yoshiyama opened this issue · comments

Hello!
When Step2 - Partial Convolution Layer.ipynb is executed, I got below error.

Let me know how to solve it.
Environment:
Windows 11 64 bit


AttributeError Traceback (most recent call last)

in
4 input_img = Input(shape=(shape[0], shape[1], shape[2],))
5 input_mask = Input(shape=(shape[0], shape[1], shape[2],))
----> 6 output_img, output_mask1 = PConv2D(8, kernel_size=(7,7), strides=(2,2))([input_img, input_mask])
7 output_img, output_mask2 = PConv2D(16, kernel_size=(5,5), strides=(2,2))([output_img, output_mask1])
8 output_img, output_mask3 = PConv2D(32, kernel_size=(5,5), strides=(2,2))([output_img, output_mask2])

~\scoop\apps\anaconda3\2020.11\envs\Py36_PConv-Keras\lib\site-packages\keras\engine\base_layer.py in call(self, inputs, **kwargs)
441
442 # Handle mask propagation.
--> 443 previous_mask = _collect_previous_mask(inputs)
444 user_kwargs = copy.copy(kwargs)
445 if not is_all_none(previous_mask):

~\scoop\apps\anaconda3\2020.11\envs\Py36_PConv-Keras\lib\site-packages\keras\engine\base_layer.py in _collect_previous_mask(input_tensors)
1309 inbound_layer, node_index, tensor_index = x._keras_history
1310 node = inbound_layer._inbound_nodes[node_index]
-> 1311 mask = node.output_masks[tensor_index]
1312 masks.append(mask)
1313 else:

AttributeError: 'Node' object has no attribute 'output_masks'

Solved this!

Solved this!

怎么解决呀 求助