MCPcopy Create free account
hub / github.com/cure-lab/deep-active-learning / __init__

Method __init__

models/linear.py:22–27  ·  view source on GitHub ↗
(self, dim, n_class, embSize=256)

Source from the content-addressed store, hash-verified

20# mlp model class
21class mlpMod(nn.Module):
22 def __init__(self, dim, n_class, embSize=256):
23 super(mlpMod, self).__init__()
24 self.embSize = embSize
25 self.dim = int(np.prod(dim))
26 self.lm1 = nn.Linear(self.dim, embSize)
27 self.lm2 = nn.Linear(embSize, n_class)
28 def forward(self, x):
29 x = x.view(-1, self.dim)
30 emb = F.relu(self.lm1(x))

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected