transformer icon indicating copy to clipboard operation
transformer copied to clipboard

Some error in position encoding

Open HN123-123 opened this issue 4 years ago • 0 comments

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!

HN123-123 avatar Nov 06 '20 06:11 HN123-123