r"""A placeholder identity operator that is argument-insensitive.
| 46 | except ImportError: |
| 47 | # Older PyTorch compatibility |
| 48 | class Identity(nn.Module): |
| 49 | r"""A placeholder identity operator that is argument-insensitive. |
| 50 | """ |
| 51 | |
| 52 | def __init__(self, *args, **kwargs): |
| 53 | super().__init__() |
| 54 | |
| 55 | def forward(self, input): |
| 56 | return input |
| 57 | |
| 58 | |
| 59 | def find_pruneable_heads_and_indices( |