ca0aca8a9219b0ef5382cdf88c2aa5343cf0d954,deeppavlov/models/classifiers/keras_classification_model.py,KerasClassificationModel,__init__,#KerasClassificationModel#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,82
Before Change
if restore_lr:
learning_rate = self.opt.get("final_learning_rate", learning_rate)
self.model = self.compile(self.model, optimizer_name=optimizer, loss_name=loss,
learning_rate=learning_rate, learning_rate_decay=learning_rate_decay)
self._change_not_fixed_params(**given_opt)
summary = ["Model was successfully initialized!", "Model summary:"]
After Change
Initialize model using parameters
from opt dictionary (from config), if model is being initialized from saved.
if learning_rate is None and isinstance(learning_rate_decay, float):
learning_rate = 0.01
elif learning_rate is None and learning_rate_decay is None:
learning_rate = 0.01
learning_rate_decay = 0.
elif isinstance(learning_rate, float) and "learning_rate_drop_patience" in kwargs:
learning_rate_decay = "no"
if classes is not None:
classes = list(classes)
given_opt = {"embedding_size": embedding_size,
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
Instances
Project Name: deepmipt/DeepPavlov
Commit Name: ca0aca8a9219b0ef5382cdf88c2aa5343cf0d954
Time: 2019-03-22
Author: dilyara.rimovna@gmail.com
File Name: deeppavlov/models/classifiers/keras_classification_model.py
Class Name: KerasClassificationModel
Method Name: __init__
Project Name: mindsdb/mindsdb
Commit Name: 3c8bfbcdc608b0a868e655d647da3c8a33aa7449
Time: 2020-07-23
Author: stpmax@yandex.ru
File Name: mindsdb/api/mysql/mysql_proxy/classes/sql_query.py
Class Name: SQLQuery
Method Name: parse_insert
Project Name: keras-team/keras
Commit Name: be24159959672c32abb31697e721d96ae6ffaf97
Time: 2016-02-27
Author: ipod825@gmail.com
File Name: keras/wrappers/scikit_learn.py
Class Name: BaseWrapper
Method Name: fit
Project Name: tensorflow/models
Commit Name: 40fdb50c5d2db7c5360d6e221031f68002d76b32
Time: 2020-06-12
Author: maximneumann@google.com
File Name: official/nlp/bert/run_classifier.py
Class Name:
Method Name: run_keras_compile_fit