def makeReversibleSequence(channels): innerChannels = channels // 2 groups = CHANNELS[0] // 2 fBlock = ResidualInner(innerChannels, groups) gBlock = ResidualInner(innerChannels, groups) #gBlock = nn.Sequential() return rv.ReversibleBlock(fBlock, gBlock)
def makeReversibleSequence(channels): innerchannels = channels // 2 groups = 2 if innerchannels > 1 else 1 #channels[0] // 2 # print("chan, groups" ,channels, groups) fBlock = ResidualInner(innerchannels, groups) gBlock = ResidualInner(innerchannels, groups) #gBlock = nn.Sequential() return rv.ReversibleBlock(fBlock, gBlock)
def makeReversibleSequence(channels): """Create a reversible block Arguments: channels {int} -- Number of in and out channels (in_chan = out_chan) Returns: [nn.Module] -- reversible block """ innerChannels = channels // 2 fBlock = ResidualInner(innerChannels) gBlock = ResidualInner(innerChannels) return rv.ReversibleBlock(fBlock, gBlock)
def revBlock(channels): """Make a reversible block Arguments: channels {[int]} -- [number of channels fixed] Returns: [nn.Module] -- [The reversible block] """ innerChannels = channels // 2 fBlock = FGFunction(innerChannels) gBlock = FGFunction(innerChannels) return rv.ReversibleBlock(fBlock, gBlock)