7f99fd7e1ea3f3a8b956232234b336ef410e6f91,function.py,,adaptive_instance_normalization,#Any#Any#,4

Before Change


    assert (size[:2] == style_feat.data.size()[:2])

    style_feat = style_feat.view(N, C, -1)
    style_std = style_feat.std(dim=2).view(N, C, 1, 1).expand(size)
    style_mean = style_feat.mean(dim=2).view(N, C, 1, 1).expand(size)
    content_feat_3d = content_feat.view(N, C, -1)
    content_std = content_feat_3d.std(dim=2).view(N, C, 1, 1).expand(size)
    content_mean = content_feat_3d.mean(dim=2).view(N, C, 1, 1).expand(size)

After Change


    assert (size[:2] == style_feat.data.size()[:2])

    style_std = style_feat.view(N, C, -1).std(dim=2).view(N, C, 1, 1)
    style_mean = style_feat.view(N, C, -1).mean(dim=2).view(N, C, 1, 1)
    content_std = content_feat.view(N, C, -1).std(dim=2).view(N, C, 1, 1)
    content_mean = content_feat.view(N, C, -1).mean(dim=2).view(N, C, 1, 1)
    normalized_feat = (content_feat - content_mean.expand(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: naoto0804/pytorch-AdaIN
Commit Name: 7f99fd7e1ea3f3a8b956232234b336ef410e6f91
Time: 2017-12-01
Author: inoue@hal.t.u-tokyo.ac.jp
File Name: function.py
Class Name:
Method Name: adaptive_instance_normalization


Project Name: HsinYingLee/DRIT
Commit Name: 8a04fa2c91f52a9c551849812d450079e667b16a
Time: 2018-07-28
Author: hytseng0509@gmail.com
File Name: src/networks.py
Class Name: LayerNorm
Method Name: forward


Project Name: batra-mlp-lab/visdial-challenge-starter-pytorch
Commit Name: 7db6246fae613a5abf1fbea0b2b987b615ae5a13
Time: 2018-12-26
Author: karandesai281196@gmail.com
File Name: visdialch/encoders/lf.py
Class Name: LateFusionEncoder
Method Name: forward