transformer
transformer copied to clipboard
Some error in position encoding
The error "ValueError: only one element tensors can be converted to Python scalars" occurred in L79: input_pos = tensor([list(range(1, len+1)) + [0]*(max_len-len) for len in input_len]) in modules.py. I want to know how to fix it, very grateful to get your reply!