def model_from_yaml(yaml_string, custom_objects=None):
 import yaml
 from keras.utils.layer_utils import layer_from_config
 config = yaml.load(yaml_string)
 return layer_from_config(config, custom_objects=custom_objects)

def model_from_yaml ( yaml_string , custom_objects = None ) : import yaml from keras . utils . layer_utils import layer_from_config config = yaml . load ( yaml_string ) return layer_from_config ( config , custom_objects = custom_objects )
parses a yaml model configuration file and returns a model instance .