404393b5ea2eab19b62bdbc609f969fd4fc99a96,basenji/seqnn.py,SeqNN,downcast,#SeqNN#,239
Before Change
elif self.ensemble is not None:
preds = self.ensemble(sequence)
preds = tf.cast(preds, dtype)
self.ensemble = tf.keras.Model(inputs=sequence, outputs=preds)
else:
preds = self.models[head_i](sequence)
preds = tf.cast(preds, dtype)
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: google/unrestricted-adversarial-examples
Commit Name: 6a13cc9c10f2f70f5b2eb44cc84d56d366d542cd
Time: 2018-08-28
Author: nottombrown@gmail.com
File Name: unrestricted-advex/unrestricted_advex/mnist_baselines/evaluate_tcu_mnist.py
Class Name:
Method Name:
Project Name: githubharald/SimpleHTR
Commit Name: b9fc4e3a1b9dc019640164b57d49ecba56364bfa
Time: 2018-08-16
Author: harald_scheidl@hotmail.com
File Name: src/main.py
Class Name:
Method Name: validate