code: public static Map<String, Object> parseModelConfig(String modelJson, String modelYaml)
              throws IOException, InvalidKerasConfigurationException {
          Map<String, Object> modelConfig;
          if (modelJson != null)
              modelConfig = parseJsonString(modelJson);
          else if (modelYaml != null)
              modelConfig = parseYamlString(modelYaml);
          else
              throw new InvalidKerasConfigurationException("Requires model configuration as either JSON or YAML string.");
          return modelConfig;
      }
docs: Parse Keras model configuration from JSON or YAML string representation
  
  @param modelJson JSON string representing model (potentially null)
  @param modelYaml YAML string representing model (potentially null)
  @return Model configuration as Map<String, Object>
  @throws IOException                        IO exception
  @throws InvalidKerasConfigurationException Invalid Keras config