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

Method forward

models/shufflenet.py:15–19  ·  view source on GitHub ↗

Channel shuffle: [N,C,H,W] -> [N,g,C/g,H,W] -> [N,C/g,g,H,w] -> [N,C,H,W]

(self, x)

Source from the content-addressed store, hash-verified

13 self.groups = groups
14
15 def forward(self, x):
16 '''Channel shuffle: [N,C,H,W] -> [N,g,C/g,H,W] -> [N,C/g,g,H,w] -> [N,C,H,W]'''
17 N,C,H,W = x.size()
18 g = self.groups
19 return x.view(N,g, int(C/g),H,W).permute(0,2,1,3,4).contiguous().view(N,C,H,W)
20
21
22class Bottleneck(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected