dc9aafd83851f7c55c6fe61702e281856ec023ca,models/modules/shift_unet.py,InceptionUnetSkipConnectionBlock,__init__,#InceptionUnetSkipConnectionBlock#,387

Before Change


        innerCos_list.append(innerCosBefore)

        innerCosAfter = InnerCos(strength=opt.strength, skip=opt.skip)
        innerCosAfter.set_mask(mask_global, opt)  // Here we need to set mask for innerCos layer too.
        innerCos_list.append(innerCosAfter)


        // Different position only has differences in `upconv`
            // for the outermost, the special is `tanh`

After Change


        uprelu = nn.ReLU(True)
        upnorm = norm_layer(outer_nc, affine=True)

        if shift_layer:
            // As the downconv layer is outer_nc in and inner_nc out.
            // So the shift define like this:
            shift = InnerSoftShiftTriple(opt.threshold, opt.fixed_mask, opt.shift_sz, opt.stride, opt.mask_thred, opt.triple_weight)

            shift.set_mask(mask_global, 3, opt.threshold)
            shift_list.append(shift)

            // Add latent constraint
            // Then add the constraint to the constrain layer list!
            innerCosBefore = InnerCos(strength=opt.strength, skip=opt.skip)
            innerCosBefore.set_mask(mask_global, opt)  // Here we need to set mask for innerCos layer too.
            innerCos_list.append(innerCosBefore)

            innerCosAfter = InnerCos(strength=opt.strength, skip=opt.skip)
            innerCosAfter.set_mask(mask_global, opt)  // Here we need to set mask for innerCos layer too.
            innerCos_list.append(innerCosAfter)


        // Different position only has differences in `upconv`
            // for the outermost, the special is `tanh`
        if outermost:
            upconv = nn.ConvTranspose2d(inner_nc, outer_nc,
                                        kernel_size=4, stride=2,
                                        padding=1)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: Zhaoyi-Yan/Shift-Net_pytorch
Commit Name: dc9aafd83851f7c55c6fe61702e281856ec023ca
Time: 2018-12-13
Author: yanzhaoyi@outlook.com
File Name: models/modules/shift_unet.py
Class Name: InceptionUnetSkipConnectionBlock
Method Name: __init__


Project Name: Zhaoyi-Yan/Shift-Net_pytorch
Commit Name: dc9aafd83851f7c55c6fe61702e281856ec023ca
Time: 2018-12-13
Author: yanzhaoyi@outlook.com
File Name: models/modules/shift_unet.py
Class Name: InceptionUnetSkipConnectionBlock
Method Name: __init__