MCPcopy Create free account
hub / github.com/MiniMax-AI/VTP / NetLinLayer

Class NetLinLayer

vtp/utils/lpips.py:117–124  ·  view source on GitHub ↗

A single linear layer which does a 1x1 conv

Source from the content-addressed store, hash-verified

115
116
117class NetLinLayer(nn.Module):
118 """A single linear layer which does a 1x1 conv"""
119
120 def __init__(self, chn_in, chn_out=1, use_dropout=False):
121 super(NetLinLayer, self).__init__()
122 layers = [nn.Dropout()] if use_dropout else []
123 layers += [nn.Conv2d(chn_in, chn_out, 1, stride=1, padding=0, bias=False)]
124 self.model = nn.Sequential(*layers)
125
126
127class vgg16(nn.Module):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected