fixed naming of bidirectional layer when loaded from saved model/config
+import copy
from ..engine import Layer
from ..engine import InputSpec
from .. import backend as K
@@ -163,7 +164,7 @@ class Bidirectional(Wrapper):
raise ValueError('Invalid merge mode. '
'Merge mode should be one of '
'{"sum", "mul", "ave", "concat", None}')
- self.forward_layer = layer
+ self.forward_layer = copy.copy(layer)
config = layer.get_config()
config['go_backwards'] = not config['go_backwards']
self.backward_layer = layer.__class__.from_config(config)
