Ejemplo n.º 1
0
 def from_config(cls, config, custom_objects=None):
   from tensorflow.python.keras._impl.keras.layers import deserialize as deserialize_layer  # pylint: disable=g-import-not-at-top
   layer = deserialize_layer(
       config.pop('layer'), custom_objects=custom_objects)
   return cls(layer, **config)
Ejemplo n.º 2
0
 def from_config(cls, config, custom_objects=None):
     from tensorflow.python.keras._impl.keras.layers import deserialize as deserialize_layer  # pylint: disable=g-import-not-at-top
     layer = deserialize_layer(config.pop('layer'),
                               custom_objects=custom_objects)
     return cls(layer, **config)