75c9e8cbcd9da21591cd5f8aaaa99205f48fa606,keras_preprocessing/image/image_data_generator.py,ImageDataGenerator,fit,#ImageDataGenerator#Any#Any#Any#Any#,905
Before Change
"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: pymanopt/pymanopt
Commit Name: 4346ff930104b0d9b6735090a1ce4c485d40b981
Time: 2016-02-25
Author: jamiehntownsend@gmail.com
File Name: pymanopt/manifolds/grassmann.py
Class Name: Grassmann
Method Name: dist
Project Name: pymanopt/pymanopt
Commit Name: 06f40aff5fafd3db599ae361d8d7aa33f3142038
Time: 2016-01-18
Author: jamiehntownsend@gmail.com
File Name: pymanopt/manifolds/grassmann.py
Class Name: Grassmann
Method Name: retr