75c9e8cbcd9da21591cd5f8aaaa99205f48fa606,keras_preprocessing/image/image_data_generator.py,ImageDataGenerator,fit,#ImageDataGenerator#Any#Any#Any#Any#,905
Before Change
if scipy is None:
raise ImportError("Using zca_whitening requires SciPy. "
"Install SciPy.")
flat_x = np.reshape(
x, (x.shape[0], x.shape[1] * x.shape[2] * x.shape[3]))
sigma = np.dot(flat_x.T, flat_x) / flat_x.shape[0]
u, s, _ = linalg.svd(sigma)
s_inv = 1. / np.sqrt(s[np.newaxis] + self.zca_epsilon)
self.principal_components = (u * s_inv).dot(u.T)
After Change
n = len(x)
flat_x = np.reshape(x, (n, -1))
u, s, _ = np.linalg.svd(flat_x.T, full_matrices=False)
s_inv = np.sqrt(n) / (s + self.zca_epsilon)
self.zca_whitening_matrix = (u * s_inv).dot(u.T)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: keras-team/keras-preprocessing
Commit Name: 75c9e8cbcd9da21591cd5f8aaaa99205f48fa606
Time: 2021-01-19
Author: eli.osherovich@gmail.com
File Name: keras_preprocessing/image/image_data_generator.py
Class Name: ImageDataGenerator
Method Name: fit
Project Name: daavoo/pyntcloud
Commit Name: 84ea1329f53f5b8e2b216d68ec3eb399e87bef9a
Time: 2017-08-01
Author: daviddelaiglesiacastro@gmail.com
File Name: pyntcloud/scalar_fields/sf_kneighbors.py
Class Name: Normals
Method Name: compute
Project Name: daavoo/pyntcloud
Commit Name: 37e60440977698fa4a5edb34e47a2bdbb8d7a167
Time: 2017-08-01
Author: daviddelaiglesiacastro@gmail.com
File Name: pyntcloud/scalar_fields/sf_kneighbors.py
Class Name: Normals
Method Name: compute