controlled-text-generation icon indicating copy to clipboard operation
controlled-text-generation copied to clipboard

TypeError: multinomial() missing 1 required positional arguments: "num_samples"

Open ZiwenZhuang opened this issue 6 years ago • 4 comments

There is a small problem with the model.py file. Python reported an error when it goes to line 297, where there is a missing argument for the multinomial function.

ZiwenZhuang avatar Sep 15 '18 10:09 ZiwenZhuang

Looks like the default num_samples argument in older versions of pytorch was 1: [https://github.com/pytorch/pytorch/issues/2546] I'm guessing that's the case here since no value was explicitly set. You should just be able to add the argument to the multinomial function to get rid of the error

cimeister avatar Jan 11 '19 06:01 cimeister

multinomial() missing 1 required positional arguments: "num_samples" how to solve the issue

RaOne24 avatar Aug 03 '20 07:08 RaOne24

while running the AI Car program

RaOne24 avatar Aug 03 '20 08:08 RaOne24

multinomial() missing 1 required positional arguments: "num_samples" how to solve the issue

you can pass num_samples=1 as parameter, hopefully it will work fine.

alexDS12 avatar Aug 31 '20 14:08 alexDS12