b66acd1fc82ce746b837879efcf02a5f59f64eb0,helper/utilty.py,,compute_mse,#Any#Any#Any#,483

Before Change


	mse = 0.0
	for i in range(border_size, image1.shape[0] - border_size):
		for j in range(border_size, image1.shape[1] - border_size):
			for k in range(image1.shape[2]):
				error = image1[i, j, k] - image2[i, j, k]
				mse += error * error

	return mse / ((image1.shape[0] - 2 * border_size) * (image1.shape[1] - 2 * border_size) * image1.shape[2])


def print_filter_weights(tensor):

After Change


	image2 = trim_image_as_file(image2)

	shave = 6 + border_size
	diff = np.subtract(image1, image2)
	diff = diff[border_size:-border_size, border_size:-border_size, :]
	mse = np.mean(np.square(diff))

	return mse
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: jiny2001/dcscn-super-resolution
Commit Name: b66acd1fc82ce746b837879efcf02a5f59f64eb0
Time: 2018-04-15
Author: jin.yamanaka@gmail.com
File Name: helper/utilty.py
Class Name:
Method Name: compute_mse


Project Name: etal/cnvkit
Commit Name: 6372bff538de67595fda0183964a8df4b9b105fb
Time: 2016-12-08
Author: eric.talevich@gmail.com
File Name: cnvlib/antitarget.py
Class Name:
Method Name: get_background


Project Name: ilastik/ilastik
Commit Name: d835c2656618fe0d227c7eb15eecb4847e8b6475
Time: 2012-07-02
Author: bergs@janelia.hhmi.org
File Name: lazyflow/operators/obsolete/classifierOperators.py
Class Name: OpPredictRandomForest
Method Name: execute