class_docstr: A Model is a network (more precisely, a directed acyclic graph) of Steps,
  and it is defined from the input/output specification of the pipeline.
  Models have fit and predict routines that, together with graph-based engine,
  allow the automatic (feed-forward) computation of each of the pipeline steps
  when fed with data.
  
  Parameters
  ----------
  inputs
      Inputs to the model.
  
  outputs
      Outputs of the model.
  
  targets
      Targets of the model.
  
  name
      Name of the model (optional). If no name is passed, a name will be
      automatically generated.
docstr: Set the parameters of the model.
  
  Parameters
  ----------
  params
      Dictionary mapping parameter names to their values. Valid parameter
      of the form ``<step-name>__<parameter-name>``). Entire steps can
      be replaced with ``<step-name>`` keys.
  
      When replacing a step, the new step will adopt the input/output/targets
      connectivity of the replaced step, including its name, trainable
      flag and compute function. Note that if the compute function is a method
      the new step must implement it too.
  
      Valid parameter keys can be listed with get_params().
  
  Returns
  -------
  self
docstr_tok: ["Set","the","parameters","of","the","model",".","Parameters","--","--","--","--","--","params","Dictionary","mapping","parameter","names","to","their","values",".","Valid","parameter","of","the","form","``","<","step-name",">","__","<","parameter-name",">","``",")",".","Entire","steps","can","be","replaced","with","``","<","step-name",">","``","keys",".","When","replacing","a","step",",","the","new","step","will","adopt","the","input\/output\/targets","connectivity","of","the","replaced","step",",","including","its","name",",","trainable","flag","and","compute","function",".","Note","that","if","the","compute","function","is","a","method","the","new","step","must","implement","it","too",".","Valid","parameter","keys","can","be","listed","with","get_params","(",")",".","Returns","--","--","--","-","self"]
code: def set_params(self, **params):
      """Set the parameters of the model.
  
      Parameters
      ----------
      params
          Dictionary mapping parameter names to their values. Valid parameter
          of the form ``<step-name>__<parameter-name>``). Entire steps can
          be replaced with ``<step-name>`` keys.
  
          When replacing a step, the new step will adopt the input/output/targets
          connectivity of the replaced step, including its name, trainable
          flag and compute function. Note that if the compute function is a method
          the new step must implement it too.
  
          Valid parameter keys can be listed with get_params().
  
      Returns
      -------
      self
      """
      # ----- 1. Replace steps
      for key in list(params.keys()):
          if key in self._steps:
              self._replace_step(key, params.pop(key))
  
      # ----- 2. Replace each step params
      # Collect params by step
      step_params = defaultdict(dict)
      for key, value in params.items():
          step_name, _, param_name = key.partition("__")
          step_params[step_name][param_name] = value
  
      # Set params for each step
      for step_name, params in step_params.items():
          step = self.get_step(step_name)
          step.set_params(**params)
  
      return self
  
imports: from collections import defaultdict
  from typing import Union, List, Dict, Set, Iterable, Optional
  from baikal._core.data_placeholder import is_data_placeholder_list, DataPlaceholder
  from baikal._core.digraph import DiGraph
  from baikal._core.step import Step, InputStep, Node
  from baikal._core.typing import ArrayLike
  from baikal._core.utils import listify, safezip2, SimpleCache, unlistify
label_desc: Use image node_id 16 for calling the Model obj's underlying member method code with example usage: obj.set_params() and returns: self