Fix learning phase management for multi-output Bidirectional wrapper
@@ -305,6 +305,10 @@ class Bidirectional(Wrapper):
# Properly set learning phase
if (getattr(y, '_uses_learning_phase', False) or
getattr(y_rev, '_uses_learning_phase', False)):
+ if self.merge_mode is None:
+ for out in output:
+ out._uses_learning_phase = True
+ else:
output._uses_learning_phase = True
return output
