I found that this error is caused by empty size input tensor of embeddingbag layers.
When i change component_in = [[3,5],[2,4,5],[2,3,4],[]]
to component_in = [[3,5],[2,4,5],[2,3,4],[2]]
, it works.
But why pytorch with cuda()
( cpu()
can run correctly) don’t support empty size input tensor for embeddingbag layers?