4a53e30fafdd8c65c42d0cf978312e6333182db4,modules/functions.py,InPlaceABN,forward,#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,72
Before Change
n = _count_samples(x)
if ctx.training:
mean = x.new().resize_as_(running_mean)
var = x.new().resize_as_(running_var)
_check_contiguous(x, mean, var)
_check(_ext.bn_mean_var_cuda, x, mean, var)
// Update running stats
running_mean.mul_((1 - ctx.momentum)).add_(ctx.momentum * mean)
running_var.mul_((1 - ctx.momentum)).add_(ctx.momentum * var * n / (n - 1))
After Change
// Prepare inputs
count = _count_samples(x)
x = x.contiguous()
weight = weight.contiguous() if ctx.affine else x.new_empty(0)
bias = bias.contiguous() if ctx.affine else x.new_empty(0)
if ctx.training:
mean, var = backend.mean_var(x)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: mapillary/inplace_abn
Commit Name: 4a53e30fafdd8c65c42d0cf978312e6333182db4
Time: 2018-05-21
Author: lorenzo@mapillary.com
File Name: modules/functions.py
Class Name: InPlaceABN
Method Name: forward
Project Name: mlflow/mlflow
Commit Name: 9199dfcdf27b7395e5094acececa52b26ca4e6e2
Time: 2019-04-16
Author: smurching@gmail.com
File Name: tests/entities/test_run_data.py
Class Name: TestRunData
Method Name: test_creation_and_hydration
Project Name: mapillary/inplace_abn
Commit Name: 4a53e30fafdd8c65c42d0cf978312e6333182db4
Time: 2018-05-21
Author: lorenzo@mapillary.com
File Name: modules/functions.py
Class Name: InPlaceABNSync
Method Name: forward