          logger.debug("Compiled inference model '%s': %s", retval.name, retval)
          return retval
  
      def _get_filtered_structure(self):
          """ Obtain the structure of the full model, filtering out inbound nodes and
          layers that are not required for the requested swap destination.
  
          Input layers to the full model are not returned in the structure.
  
          Returns
          -------
 
</s> remove         Input layers to the full model are not returned in the structure.
 </s> add         This parses the model config (in reverse) to obtain the required layers for an inference
        model. </s> remove             compiled_layers[name] = model
        retval = KerasModel(self._inputs, model, name="{}_inference".format(saved_model.name))
 </s> add             compiled_layers[layer.name] = model
            retval = KerasModel(model_inputs, model, name="{}_inference".format(saved_model.name)) </s> remove         set
            The layers from the saved model that are required to build the inference model
 </s> add         list
            List of input tensors to feed the model for the requested swap direction </s> remove         filtered_structure: :class:`OrderedDict`
            The full model structure with unused inbound nodes and layers removed
 </s> add         inputs: list
            The full list of input tensors to the saved faceswap training model </s> remove         input_split = len(inputs) // 2
        start_idx = input_split * input_index
        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)
        return retval

    def _get_outputs_dropout(self):
        """ Obtain the output layer names from the full model that will not be used for inference.

        Returns
        -------
        set
            The output layer names from the saved Faceswap model that are not used for inference
            for the requested swap direction
        """
        outputs = self._config["output_layers"]
        if get_backend() == "amd":
            outputs = [outputs[:len(outputs) // 2], outputs[len(outputs) // 2:]]

        output_names = self._filter_node(outputs)
        if not all(isinstance(name, list) for name in output_names):
            output_names = [[name] for name in output_names]
        side_outputs = set(output_names[self._output_idx])
        logger.debug("model outputs: %s, output_names: %s, side_outputs: %s",
                     outputs, output_names, side_outputs)

        outputs_all = {layer
                       for side in output_names
                       for layer in side}
        retval = outputs_all.difference(side_outputs)
        logger.debug("outputs dropout: %s", retval)
 </s> add         nodes = np.array(nodes, dtype="object")[..., :3]
        num_layers = nodes.shape[0]
        nodes = nodes[self._output_idx] if num_layers == 2 else nodes[0]
        retval = [(node[0], node[2]) for node in nodes]
        """ Obtain the structure of the inference model.
          logger.debug("Compiled inference model '%s': %s", retval.name, retval)
          return retval
  
      def _get_filtered_structure(self):
        """ Obtain the structure of the inference model.
        """ Obtain the structure of the inference model.
  
          Input layers to the full model are not returned in the structure.
  
          Returns
          -------
keep keep keep keep replace replace keep keep keep keep keep
 plugins.train.model.base - More robust inference model generation 
plugins/train/model/_base.py