[英]TypeError: backward() got an unexpected keyword argument 'variables'
I am using the recurrent Gaussian Process library .我正在使用循环高斯过程库。 I believe the code is developed by older versions of python and pytorch.
我相信代码是由旧版本的 python 和 pytorch 开发的。 I ran one of the experiments of the model after cloning the repository
克隆存储库后,我进行了模型的一项实验
python ./testing/rnn_rgp_test.py
I got this error message from this line of the rnn_encoder.py script :我从rnn_encoder.py 脚本的这一行收到此错误消息:
./RGP/autoreg/rnn_encoder.py", line 274, in backward_computation
torch.autograd.backward( variables=self.forward_means_list + self.forward_vars_list,
TypeError: backward() got an unexpected keyword argument 'variables'
I will be grateful if someone can point out how I can fix this error?如果有人能指出我如何解决此错误,我将不胜感激?
Version 0.3.1 of PyTorch seems to be the last version with the variables
parameter. PyTorch 的0.3.1版本似乎是最后一个带有
variables
参数的版本。 Ideally, the RGP library should have documented which version of their dependencies they use but they didn't.理想情况下,RGP 库应该记录他们使用的依赖项的哪个版本,但他们没有。 Given that their Git repo seems to be inactive, you have several choices:
鉴于他们的 Git 存储库似乎处于非活动状态,您有多种选择:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.