MCPcopy Create free account
hub / github.com/deeplearning-wisc/MOOD / ParallelModule

Class ParallelModule

models/msdnet.py:177–193  ·  view source on GitHub ↗

This module is similar to luatorch's Parallel Table input: N tensor network: N module output: N tensor

Source from the content-addressed store, hash-verified

175
176
177class ParallelModule(nn.Module):
178 """
179 This module is similar to luatorch's Parallel Table
180 input: N tensor
181 network: N module
182 output: N tensor
183 """
184 def __init__(self, parallel_modules):
185 super(ParallelModule, self).__init__()
186 self.m = nn.ModuleList(parallel_modules)
187
188 def forward(self, x):
189 res = []
190 for i in range(len(x)):
191 res.append(self.m[i](x[i]))
192
193 return res
194
195
196class ClassifierModule(nn.Module):

Callers 1

_build_transitionMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected