4f1fa6fa654e8f09cb24d615144af28c334fe070,onmt/io/TextDataset.py,TextDataset,sort_key,#TextDataset#Any#,88

Before Change


         Sort using length of source sentences. 
        // Default to a balanced sort, prioritizing tgt len match.
        // TODO: make this configurable.
        return (int(len(ex.tgt) / 5), int(len(ex.src) / 5))

    @staticmethod
    def collapse_copy_scores(scores, batch, tgt_vocab, src_vocabs):
        

After Change



    def sort_key(self, ex):
         Sort using length of source sentences. 
        return len(ex.src)

    @staticmethod
    def collapse_copy_scores(scores, batch, tgt_vocab, src_vocabs):
        
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 6

Instances


Project Name: OpenNMT/OpenNMT-py
Commit Name: 4f1fa6fa654e8f09cb24d615144af28c334fe070
Time: 2018-03-05
Author: srush@seas.harvard.edu
File Name: onmt/io/TextDataset.py
Class Name: TextDataset
Method Name: sort_key


Project Name: evilsocket/pwnagotchi
Commit Name: 58a085188f54983026f5f4c4ce70055f999d2969
Time: 2019-10-19
Author: speeskonijn@gmail.com
File Name: pwnagotchi/plugins/default/memtemp.py
Class Name:
Method Name: mem_usage


Project Name: OpenNMT/OpenNMT-py
Commit Name: 68fbfd1876c367323acf830736bae1af499cc0fe
Time: 2018-03-07
Author: dengyuntian@gmail.com
File Name: onmt/io/TextDataset.py
Class Name: TextDataset
Method Name: sort_key


Project Name: evilsocket/pwnagotchi
Commit Name: 58a085188f54983026f5f4c4ce70055f999d2969
Time: 2019-10-19
Author: speeskonijn@gmail.com
File Name: pwnagotchi/plugins/default/memtemp.py
Class Name:
Method Name: cpu_load