Open weilaweila opened 6 years ago
Suffered from the same problem
I get this error even for the Simple RNN demo.
I got the same problem.
Confirmed same issue with both Theano and Tensorflow backends.
When used together with Keras 2.1.0 the issue doesn't occur.
I found https://github.com/tensorflow/cleverhans/pull/341 may help.
Pls modify code at line 841~851 in engine.py inbound_nodes -> _inbound_nodes Just as below:
if num == 1:
optional_input_placeholder = _to_list(_OptionalInputPlaceHolder()._inbound_nodes[0].output_tensors)[0]
assert self._is_optional_input_placeholder(optional_input_placeholder)
return optional_input_placeholder
else:
y = []
for _ in range(num):
optional_input_placeholder = _to_list(_OptionalInputPlaceHolder()._inbound_nodes[0].output_tensors)[0]
assert self._is_optional_input_placeholder(optional_input_placeholder)
y.append(optional_input_placeholder)
return y
Yes I already found it out
Thanks!!
On Fri, Feb 2, 2018 at 5:39 AM, macgaf notifications@github.com wrote:
Pls modify code at line 841~851 in engine.py inbound_nodes -> _inbound_nodes Just as below:
if num == 1: optional_input_placeholder = _to_list(_OptionalInputPlaceHolder()._inbound_nodes[0].output_tensors)[0] assert self._is_optional_input_placeholder(optional_input_placeholder) return optional_input_placeholder else: y = [] for _ in range(num): optional_input_placeholder = _to_list(_OptionalInputPlaceHolder()._inbound_nodes[0].output_tensors)[0] assert self._is_optional_input_placeholder(optional_input_placeholder) y.append(optional_input_placeholder) return y
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/farizrahman4u/recurrentshop/issues/91#issuecomment-362476879, or mute the thread https://github.com/notifications/unsubscribe-auth/AH9tZyfT0d3yB0e53jBKMCDi075_08rYks5tQoN-gaJpZM4RijRT .
duplicated by #90
I made this change but it still doesn't work.
Have you changed correct engine.py?
I still get the issue with the modified code:
there are two engine.py,one is in build/lib, the other is in recurentshop,is this two py the same? why my engine 841-851 line are like this ,should i change code as you said? `def get_cell(self, kwargs): return RNNCellFromModel(self.model, kwargs)
def _get_optional_input_placeholder(self, name=None, num=1):
if name:
if name not in self._optional_input_placeholders:
if num > 1:
self._optional_input_placeholders[name] = [self._get_optional_input_placeholder() for _ in range(num)]
else:
self._optional_input_placeholders[name] = self._get_optional_input_placeholder()
return self._optional_input_placeholders[name]`
model = Seq2Seq(batch_input_shape=(16, 7, 5), hidden_dim=10, output_length=8, output_dim=20, depth=4, peek=True) AttributeError: '_OptionalInputPlaceHolder' object has no attribute 'inbound_nodes'