b66acd1fc82ce746b837879efcf02a5f59f64eb0,helper/utilty.py,,compute_mse,#Any#Any#Any#,483
Before Change
image1 = trim_image_as_file(image1)
image2 = trim_image_as_file(image2)
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):
print("Tensor[%s] shape=%s" % (tensor.name, str(tensor.get_shape())))
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
def print_filter_weights(tensor):
print("Tensor[%s] shape=%s" % (tensor.name, str(tensor.get_shape())))
weight_value = tensor.eval()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
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: interactiveaudiolab/nussl
Commit Name: e01dc00651cb36ee62d3cb9c97d82a4892e1f001
Time: 2017-02-09
Author: ethanmanilow@gmail.com
File Name: nussl/audio_signal.py
Class Name: AudioSignal
Method Name: __sub__
Project Name: interactiveaudiolab/nussl
Commit Name: 9d9ef625dccb7ba0ed3295f18d90de9d6dd59469
Time: 2017-04-04
Author: ethanmanilow@gmail.com
File Name: nussl/audio_signal.py
Class Name: AudioSignal
Method Name: __sub__