https://github.com/elifesciences-publications/spatial_patterns
Tip revision: 3ba83428512a3aa69c836db7daa7d6e6ef2490b4 authored by editorialelife on 28 February 2019, 16:39:28 UTC
Update README.md
Update README.md
Tip revision: 3ba8342
observables.py
import numpy as np
##############################################
########## Measures for Learning ##########
##############################################
def sum_difference_squared(old_weights, new_weights):
"""
Sum of squared differences between old and new weights
- old_weights, new_weights are numpy arrays
"""
return np.sum(np.square(new_weights - old_weights))