How does one deal with the RunTimeError when the dimension have been counted a lot and can't infer the dimensions?

What does the error:

RuntimeError: already counted a million dimensions in a given sequence. Most likely your items are also sequences and there's no way to infer how many dimension should the tensor have 

mean and how does one fix it?

I only have:

W = Variable(w_init, requires_grad=True)
W_avg = Variable(torch.FloatTensor(W).type(dtype), requires_grad=False)

but I hope to make this hope more generally helpful beyond just my very (probably newbie) question.

Please post your full code and the full error stack to know which one of both lines of code
gives the error.
Where do you declare and initialize “w_init” ?