7f0eb809f1509c452d85000fd002b12c22e358ca,kornia/filters/kernels.py,,gaussian,#Any#Any#,17
Before Change
def gauss_fcn(x):
return -(x - window_size // 2) ** 2 / float(2 * sigma ** 2)
gauss = torch.stack(
[torch.exp(torch.tensor(gauss_fcn(x))) for x in range(window_size)]
)
return gauss / gauss.sum()
def laplacian_1d(window_size) -> torch.Tensor:
After Change
def gaussian(window_size, sigma):
x = torch.arange(window_size).float() - window_size // 2
if window_size % 2 == 0:
x = x + 0.5
gauss = torch.exp((-x.pow(2.0) / float(2 * sigma ** 2)))
return gauss / gauss.sum()
def laplacian_1d(window_size) -> torch.Tensor:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: arraiy/torchgeometry
Commit Name: 7f0eb809f1509c452d85000fd002b12c22e358ca
Time: 2019-08-22
Author: ducha.aiki@gmail.com
File Name: kornia/filters/kernels.py
Class Name:
Method Name: gaussian
Project Name: hpclab/rankeval
Commit Name: 8d4fee5d7dc69f82aadb38abc4564dda5cc8580f
Time: 2017-06-14
Author: cristina.i.muntean@gmail.com
File Name: rankeval/core/metrics/dcg.py
Class Name: DCG
Method Name: eval_per_query
Project Name: astorfi/TensorFlow-World
Commit Name: 874382bfb96b92dcfdd6326ba83c54ad1e9d42f2
Time: 2017-06-26
Author: amirsina.torfi@gmail.com
File Name: codes/2-basics_in_machine_learning/linear_regression/code/linear_regression.py
Class Name:
Method Name: