75c9e8cbcd9da21591cd5f8aaaa99205f48fa606,keras_preprocessing/image/image_data_generator.py,ImageDataGenerator,fit,#ImageDataGenerator#Any#Any#Any#Any#,905
Before Change
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
x /= (self.std + 1e-6)
if self.zca_whitening:
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)
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: nipy/dipy
Commit Name: ba8bfb474b108565ac8f77544d0aeb8b1a9a0fdc
Time: 2011-02-09
Author: garyfallidis@gmail.com
File Name: dipy/reconst/dandelion.py
Class Name: SphericalDandelion
Method Name: spherical_diffusivity
Project Name: scipy/scipy
Commit Name: 97070a67bafcf2ecf4ecde78f3b8d5617feb3ebd
Time: 2013-09-16
Author: argriffi@ncsu.edu
File Name: scipy/sparse/linalg/matfuncs.py
Class Name:
Method Name: _ell