404393b5ea2eab19b62bdbc609f969fd4fc99a96,basenji/seqnn.py,SeqNN,downcast,#SeqNN#Any#Any#,239
Before Change
// replace model
if self.embed is not None:
preds = self.embed(sequence)
preds = tf.cast(preds, dtype)
self.embed = tf.keras.Model(inputs=sequence, outputs=preds)
elif self.ensemble is not None:
After Change
model_down = tf.keras.Model(inputs=sequence, outputs=preds)
// replace model
if self.embed is not None:
self.embed = model_down
elif self.ensemble is not None:
self.ensemble = model_down
elif head_i is not None:
self.models[head_i] = model_down
else:
self.model = model_down
def evaluate(self, seq_data, head_i=None, loss="poisson"):
Evaluate model on SeqDataset.
// choose model
if self.ensemble is not None:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: calico/basenji
Commit Name: 404393b5ea2eab19b62bdbc609f969fd4fc99a96
Time: 2020-11-10
Author: drk@calicolabs.com
File Name: basenji/seqnn.py
Class Name: SeqNN
Method Name: downcast
Project Name: pyannote/pyannote-audio
Commit Name: d6b449edcbdaf559807aaff6bd3234f47134e303
Time: 2017-05-11
Author: bredin@limsi.fr
File Name: pyannote/audio/embedding/approaches/center_loss.py
Class Name: CenterLoss
Method Name: loss_and_grad
Project Name: dpressel/mead-baseline
Commit Name: ccf28747f4f037d7b7dd38756d291620d4a4ce9b
Time: 2020-04-26
Author: dpressel@gmail.com
File Name: baseline/tf/lm/model.py
Class Name: LanguageModelBase
Method Name: create