9c227d6b1acd1dec7ec6da9f249227980b49f975,torchsample/transforms/affine_transforms.py,Translation,__call__,#Translation#Any#Any#,316
Before Change
else:
tx = 0
// width shift
if self.width_range > 0:
ty = random.uniform(-self.width_range, self.width_range) * x.size(2)
else:
ty = 0
translation_matrix = np.array([[1, 0, tx],
[0, 1, ty],
[0, 0, 1]])
if self.lazy:
After Change
def __call__(self, x, y=None):
degree = random.uniform(-self.rotation_range, self.rotation_range)
theta = math.pi / 180 * degree
rotation_matrix = np.array([[math.cos(theta), -math.sin(theta), 0],
[math.sin(theta), math.cos(theta), 0],
[0, 0, 1]])
if self.lazy:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: ncullen93/torchsample
Commit Name: 9c227d6b1acd1dec7ec6da9f249227980b49f975
Time: 2017-03-01
Author: ncullen@Nicks-MacBook-Pro.local
File Name: torchsample/transforms/affine_transforms.py
Class Name: Translation
Method Name: __call__
Project Name: matplotlib/matplotlib
Commit Name: 596345e6ec8a33759abe21563902e0d7e9b357e7
Time: 2017-12-02
Author: anntzer.lee@gmail.com
File Name: examples/user_interfaces/embedding_in_tk_sgskip.py
Class Name:
Method Name:
Project Name: matplotlib/matplotlib
Commit Name: 2597f3deace4fbea6d755f3b440935c8041832fd
Time: 2017-12-11
Author: anntzer.lee@gmail.com
File Name: examples/user_interfaces/embedding_in_tk_sgskip.py
Class Name:
Method Name: