Created
April 5, 2020 18:35
-
-
Save mladvladimir/afba73e36bcfa65974a87e28301ddfec to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let mut batch_tokens = Vec::new(); | |
let mut longest_seq = 0; | |
for idx in &length_sorted_idx[batch_start..batch_end] { | |
let sentence = &sentences[*idx]; | |
println!("pa gde se gubis koji kurac - longest_seq {:?}", longest_seq); | |
let tokens = self.bert.tokenize(&sentence); | |
let mut longest_seq = &longest_seq.max(tokens.len()); | |
batch_tokens.push(tokens); | |
} |
pradovic
commented
Apr 5, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment