MCPcopy Create free account
hub / github.com/VisionRush/DeepFakeDefenders / __init__

Method __init__

model/convnext.py:125–133  ·  view source on GitHub ↗
(self, normalized_shape, eps=1e-6, data_format="channels_last")

Source from the content-addressed store, hash-verified

123 with shape (batch_size, channels, height, width).
124 """
125 def __init__(self, normalized_shape, eps=1e-6, data_format="channels_last"):
126 super().__init__()
127 self.weight = nn.Parameter(torch.ones(normalized_shape))
128 self.bias = nn.Parameter(torch.zeros(normalized_shape))
129 self.eps = eps
130 self.data_format = data_format
131 if self.data_format not in ["channels_last", "channels_first"]:
132 raise NotImplementedError
133 self.normalized_shape = (normalized_shape, )
134
135 def forward(self, x):
136 if self.data_format == "channels_last":

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected