1ac89d52072da78fe54dfec450a05b8356c7ce8b,deepchem/trans/transformers.py,NormalizationFitTransformer,X_transform,#NormalizationFitTransformer#Any#,680
Before Change
return (X-X_means)/X_stds
def X_transform(self, X):
return self.normalize(X)
def transform(self, dataset):
raise NotImplementedError(
"Cannot transform datasets with FitTransformer")
After Change
def X_transform(self, X):
batch_size = X.shape[0]
X_t = []
for i in range(batch_size):
X_t.append(self.normalize(X[i]))
X_t = np.array(X_t)
return X_t
def transform(self, dataset):
raise NotImplementedError(
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances
Project Name: deepchem/deepchem
Commit Name: 1ac89d52072da78fe54dfec450a05b8356c7ce8b
Time: 2017-01-18
Author: joegomes@stanford.edu
File Name: deepchem/trans/transformers.py
Class Name: NormalizationFitTransformer
Method Name: X_transform
Project Name: raghakot/keras-vis
Commit Name: 1cfa7fe6827b8e83ddd92d5d822277f6b7a77c39
Time: 2016-12-12
Author: ragha@outlook.com
File Name: optimizer.py
Class Name: Optimizer
Method Name: __init__
Project Name: facebookresearch/pytext
Commit Name: 66584dea87782aed5509e4269a9f015002e1f5c1
Time: 2021-02-23
Author: mikekg@fb.com
File Name: pytext/torchscript/module.py
Class Name: PyTextEmbeddingModuleWithDense
Method Name: forward
Project Name: IndicoDataSolutions/finetune
Commit Name: 6104513bdef028f870c1603fad58c034acf0f4c8
Time: 2018-12-28
Author: benlt@hotmail.co.uk
File Name: finetune/base.py
Class Name: BaseModel
Method Name: finetune