      def __init__(self, saved_model, switch_sides):
          logger.debug("Initializing: %s (saved_model: %s, switch_sides: %s)",
                       self.__class__.__name__, saved_model, switch_sides)
          self._config = saved_model.get_config()
          input_idx = 1 if switch_sides else 0
          self._output_idx = 0 if switch_sides else 1
          self._input_names = set(self._filter_node(self._config["input_layers"][input_idx]))
  
          self._inputs = self._get_inputs(saved_model.inputs, input_idx)
          self._outputs_dropout = self._get_outputs_dropout()
 
</s> remove         self._input_names = set(self._filter_node(self._config["input_layers"][input_idx]))
 </s> add  </s> remove         self._inputs = self._get_inputs(saved_model.inputs, input_idx)
        self._outputs_dropout = self._get_outputs_dropout()
 </s> add         self._input_names = [inp[0] for inp in self._config["input_layers"]] </s> remove         retval = set()
        for idx, (name, inbound) in enumerate(reversed(filtered_structure.items())):
            if idx == 0:
                logger.debug("Adding output layer: '%s'", name)
                retval.add(name)
            if idx != 0 and name not in retval:
                logger.debug("Skipping unused layer: '%s'", name)
                continue
            logger.debug("Adding inbound layers: %s", inbound)
            retval.update(inbound)
        logger.debug("Required layers: %s", retval)
 </s> add         input_split = len(inputs) // 2
        start_idx = input_split * self._input_idx
        retval = inputs[start_idx: start_idx + input_split]
        logger.debug("model inputs: %s, input_split: %s, start_idx: %s, inference_inputs: %s",
                     inputs, input_split, start_idx, retval) </s> remove             layer = layer_dict[name]
 </s> add             inbound = struct[layer.name] </s> remove         for name, inbound in struct.items():
            if name not in required_layers:
                logger.debug("Skipping unused layer: '%s'", name)
 </s> add         for layer in saved_model.layers:
            if layer.name not in struct:
                logger.debug("Skipping unused layer: '%s'", layer.name)
        self._input_idx = 1 if switch_sides else 0
      def __init__(self, saved_model, switch_sides):
          logger.debug("Initializing: %s (saved_model: %s, switch_sides: %s)",
                       self.__class__.__name__, saved_model, switch_sides)
          self._config = saved_model.get_config()
        self._input_idx = 1 if switch_sides else 0
          self._output_idx = 0 if switch_sides else 1
          self._input_names = set(self._filter_node(self._config["input_layers"][input_idx]))
  
          self._inputs = self._get_inputs(saved_model.inputs, input_idx)
          self._outputs_dropout = self._get_outputs_dropout()
keep keep keep keep replace keep keep keep keep keep
 plugins.train.model.base - More robust inference model generation 
plugins/train/model/_base.py