def _forward_layer(layer, inputs, kwarg_inputs, outputs) -> _List:
        """
        Perform forward pass on layer and store outputs.
        """
        for j, inp in enumerate(inputs):
            if isinstance(inp, _torch.Tensor):
                inp = (inp,)
            outputs[j] = layer(*inp, **kwarg_inputs)
        return outputs

        Perform forward pass on layer and store outputs.
        
coremltools/optimize/torch/layerwise_compression/layerwise_compressor.py