MCPcopy Create free account
hub / github.com/XLearning-SCU/2022-CVPR-DART / forward

Method forward

model.py:11–14  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

9 self.power = power
10
11 def forward(self, x):
12 norm = x.pow(self.power).sum(1, keepdim=True).pow(1. / self.power)
13 out = x.div(norm)
14 return out
15
16class Non_local(nn.Module):
17 def __init__(self, in_channels, reduc_ratio=2):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected