gevorgter
gevorgter
Python3 changes behaviour of / operator. change lines (notice // vs / ) cell_w = image['width']//grid_w cell_h = image['height']//grid_h
@shartoo I did (replace // with / and you will get original code). But the code was changed. So my fix might be not relevant anymore. But in a nutshell...
Sorry, no reference. But my hunch is that training might not be thread safe but inference is since there is no gradient to keep and it's just calculations. Pytorch team...
Also, i believe you misunderstanding the token_type_ids from here https://huggingface.co/transformers/v3.2.0/glossary.html#token-type-ids " The first sequence, the “context” used for the question, has all its tokens represented by a 0, whereas the...
Easy to fix #1 ``` public List Encode(int sequenceLength, params string[] texts) { var tokens = Tokenize(texts); List padding; if (sequenceLength > tokens.Count) padding = Enumerable.Repeat(0L, sequenceLength - tokens.Count).ToList(); else...
1. You could not get it to work with multiple sentences at a time because presented code produces incorrect output. Instead of int [][] it produces int[] for multiple sentences....