7adb6d43387cd054d10dfafe0b3a6f00ce2e0e4e,elephas/ml_model.py,ElephasEstimator,_fit,#ElephasEstimator#Any#,47
Before Change
simple_rdd = df_to_simple_rdd(df, categorical=self.categorical,
nb_classes=self.nb_classes)
simple_rdd = simple_rdd.repartition(self.num_workers)
self.train(simple_rdd, nb_epoch=self.nb_epoch,
batch_size=self.batch_size, verbose=self.verbose,
validation_split=self.validation_split)
return ElephasTransformer(self.spark_context, self.master_network)
class ElephasTransformer(SparkModel, Transformer):
After Change
simple_rdd = simple_rdd.repartition(self.get_num_workers())
optimizer = None
if self.get_optimizer_config() is not None:
optimizer = get(self.get_optimizer_config()["name"], self.get_optimizer_config())
spark_model = SparkModel(simple_rdd.ctx, model_from_yaml(self.get_keras_model_config()), optimizer=optimizer,
mode=self.get_mode(), frequency=self.get_frequency(),
num_workers=self.get_num_workers())
spark_model.train(simple_rdd)
model_weights = spark_model.master_network.get_weights()
weights = simple_rdd.ctx.broadcast(model_weights)
return ElephasTransformer(inputCol=self.getFeaturesCol(),
keras_model_config=spark_model.master_network.to_yaml(),
weights=weights)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances
Project Name: maxpumperla/elephas
Commit Name: 7adb6d43387cd054d10dfafe0b3a6f00ce2e0e4e
Time: 2016-02-23
Author: max.pumperla@googlemail.com
File Name: elephas/ml_model.py
Class Name: ElephasEstimator
Method Name: _fit
Project Name: pyannote/pyannote-audio
Commit Name: e234fcf526548d0da6b1180639c9bea92e107fc0
Time: 2016-11-17
Author: hbredin@users.noreply.github.com
File Name: scripts/speaker_embedding.py
Class Name:
Method Name: train
Project Name: dmlc/gluon-nlp
Commit Name: d6f719466f1b61ffad90e97ba7573a081054c444
Time: 2019-01-29
Author: gogamza@gmail.com
File Name: scripts/bert/finetune_classifier.py
Class Name:
Method Name:
Project Name: drckf/paysage
Commit Name: 9cb86cc4d235f259cea36b9349bdd320047aa990
Time: 2016-12-05
Author: charlesfisher@Charless-MacBook-Pro.local
File Name: main.py
Class Name:
Method Name: