You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The docs mention that the function can be used as torch.multinomial([res,], p, n, [,replacement]) but calling torch(res, p, n) does not seem to work, it simply fails mentioning that torch.LongTensor does not implement torch.multinomial.
The text was updated successfully, but these errors were encountered:
This is a similar problem than the one mentioned in #231 , because the output of multinomial is supposed to be a LongTensor, and when you call it with torch.multinomial it looks for the type of it's first argument (which is a LongTensor), but multinomial expects p to be FloatTensor or DoubleTensor.
But there is actually a workaround for this, which is to call it as p.multinomial(res,p,n,[replacement]). This way, you explicitly specify that you want to call it for the type of tensor p.
The docs mention that the function can be used as
torch.multinomial([res,], p, n, [,replacement])
but callingtorch(res, p, n)
does not seem to work, it simply fails mentioning that torch.LongTensor does not implement torch.multinomial.The text was updated successfully, but these errors were encountered: