MCPcopy Create free account
hub / github.com/chenhaoxing/HDNet / __init__

Method __init__

models/att.py:6–11  ·  view source on GitHub ↗
(self, dims_in)

Source from the content-addressed store, hash-verified

4
5class LocalDynamics(nn.Module):
6 def __init__(self, dims_in):
7
8 super(LocalDynamics, self).__init__()
9 self.linear = nn.Conv1d(dims_in*2, dims_in, kernel_size=1, stride=1, padding=0)
10 self.softmax = nn.Softmax(dim = -1)
11 self.k = 1
12 def forward(self, x, mask):
13 mask = F.interpolate(mask.detach(), size=x.size()[2:], mode='nearest')
14 B, C, H, W = x.shape

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected