ucbdrive/skipnet

Confused about version of PyTorch

parap1uie-s opened this issue · 2 comments

Hi,

Thanks for the excellent research and the readable code.

I am trying to run this repo with PyTorch 1.0, and get confusion about the version number.
As written in README, the PyTorch 2.0 is needed.
However, the newest stable version of PyTorch is 1.0.1, why and what is PyTorch 2.0?

Meanwhile, I still get an error about multinomial() in RLFeedforwardGateI.
I checked the PyTorch docs from 0.1.0 to 0.4.1, multinomial() function needs a parameter called num_samples which is not optional.
And the code in RLFeedforwardGateI was written like this:

    if self.training:
        action = softmax.multinomial()
        self.saved_action = action

without any parameter, and I got an error:

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

I guess there should be

        action = softmax.multinomial(num_samples=1)

Thanks in advance.

Hi parap1uie-s, sorry about the confusion. The current version supported is Pytorch 0.2.0. Some of the functionality has been removed in the newer version of Pytorch. I will update the code to the newer version soon. Thanks!

Thanks for reply.

PyTorch API changed, got it.