fc0f28ef337bb7b087fbba43fb085af27d34d846,torchsample/transforms/image_transforms.py,Contrast,__call__,#Contrast#,220
Before Change
self.var = var
def __call__(self, x, y=None):
channel_means = x.mean(1)
for i in range(2,x.dim()):
channel_means = channel_means.mean(i)
channel_means = channel_means.expand_as(x)
x = (x - channel_means) * self.var + channel_means
if y is not None:
After Change
x = th.clamp((x - channel_means) * self.value + channel_means,0,1)
if y is not None:
channel_means = y .mean(1).mean(2 ).expand_as(y)
y = th.clamp((y - channel_means) * self.value + channel_means,0,1)
return x, y
return x
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances Project Name: ncullen93/torchsample
Commit Name: fc0f28ef337bb7b087fbba43fb085af27d34d846
Time: 2017-05-05
Author: ncullen.th@dartmouth.edu
File Name: torchsample/transforms/image_transforms.py
Class Name: Contrast
Method Name: __call__
Project Name: commonsense/conceptnet5
Commit Name: 8ea593ba135faf00d9ba39f393682172366eee9b
Time: 2017-06-09
Author: rob@luminoso.com
File Name: conceptnet5/vectors/retrofit.py
Class Name:
Method Name: retrofit
Project Name: commonsense/conceptnet5
Commit Name: 19a796cf092d0b0f88e2919cbee45bb5270835cf
Time: 2017-06-21
Author: rob@luminoso.com
File Name: conceptnet5/vectors/retrofit.py
Class Name:
Method Name: retrofit