MCPcopy Index your code
hub / github.com/SooLab/CGFormer / Identity

Class Identity

bert/modeling_utils.py:48–56  ·  view source on GitHub ↗

r"""A placeholder identity operator that is argument-insensitive.

Source from the content-addressed store, hash-verified

46except 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
59def find_pruneable_heads_and_indices(

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected