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

Class ParallelModule

models/msdnet_ge.py:204–220  ·  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

202
203
204class ParallelModule(nn.Module):
205 """
206 This module is similar to luatorch's Parallel Table
207 input: N tensor
208 network: N module
209 output: N tensor
210 """
211 def __init__(self, parallel_modules):
212 super(ParallelModule, self).__init__()
213 self.m = nn.ModuleList(parallel_modules)
214
215 def forward(self, x):
216 res = []
217 for i in range(len(x)):
218 res.append(self.m[i](x[i]))
219
220 return res
221
222
223class ClassifierModule(nn.Module):

Callers 1

_build_transitionMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected