7f99fd7e1ea3f3a8b956232234b336ef410e6f91,function.py,,adaptive_instance_normalization,#,4
Before Change
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)
normalized_feat = (content_feat - content_mean) / content_std
return normalized_feat * style_std + style_mean
After Change
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(
size)) / content_std.expand(size)
return normalized_feat * style_std.expand(size) + style_mean.expand(size)
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: nerox8664/pytorch2keras
Commit Name: c0b06f1c3eaaab3d98c14590ff0c8a96dba3ebb1
Time: 2018-11-24
Author: nerox8664@gmail.com
File Name: tests/models/senet.py
Class Name: SELayer
Method Name: forward
Project Name: naoto0804/pytorch-AdaIN
Commit Name: 1c5172e8551cb02056949594f89950be2592daae
Time: 2018-01-04
Author: inoue@hal.t.u-tokyo.ac.jp
File Name: function.py
Class Name:
Method Name: adaptive_instance_normalization