d305759b714cddfa66d214f4dceffe26679e2c02,deeppavlov/models/squad/squad.py,SquadModel,train_on_batch,#SquadModel#Any#Any#Any#Any#Any#Any#,260

Before Change


        // TODO: filter examples in batches with answer position greater self.context_limit
        // select one answer from list of correct answers
        y1s = list(map(lambda x: x[0], y1s))
        y2s = list(map(lambda x: x[0], y2s))
        feed_dict = self._build_feed_dict(c_tokens, c_chars, q_tokens, q_chars, y1s, y2s)
        loss, _ = self.sess.run([self.loss, self.train_op], feed_dict=feed_dict)
        return loss

After Change


        
        // TODO: filter examples in batches with answer position greater self.context_limit
        // select one answer from list of correct answers
        y1s = np.array([x[0] for x in y1s])
        y2s = np.array([x[0] for x in y2s])
        if self.noans_token:
            noans_mask = ((y1s != -1) * (y2s != -1))
            y1s = (y1s + 1) * noans_mask
            y2s = (y2s + 1) * noans_mask

        feed_dict = self._build_feed_dict(c_tokens, c_chars, q_tokens, q_chars, y1s, y2s)
        loss, _ = self.sess.run([self.loss, self.train_op], feed_dict=feed_dict)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: deepmipt/DeepPavlov
Commit Name: d305759b714cddfa66d214f4dceffe26679e2c02
Time: 2018-10-15
Author: yurakuratov@gmail.com
File Name: deeppavlov/models/squad/squad.py
Class Name: SquadModel
Method Name: train_on_batch


Project Name: ANSSI-FR/SecuML
Commit Name: 14b0d3efb14e998029aa3f2e633afda4b8436118
Time: 2019-05-03
Author: anael.beaugnon@ssi.gouv.fr
File Name: secuml/core/classif/monitoring/prediction/proba_barplot.py
Class Name: ProbaBarplot
Method Name: display_label


Project Name: sebp/scikit-survival
Commit Name: 4f80e34b275f0643aa58093496769ef1c457835c
Time: 2016-12-26
Author: sebp@k-d-w.org
File Name: survival/ensemble/boosting.py
Class Name: ComponentwiseGradientBoostingSurvivalAnalysis
Method Name: feature_importances_