Skip to content
Advertisement

Multiple values for argument

I am trying to convert this code passing it with pysyft refference

like this :

JavaScript

But when I try to create a instance of the model

JavaScript

I got a TypeError

TypeError: multiple values for argument ‘torch_ref’

I tried to change the order of the arguments but i got an error about positional arguments . Can you help me , I am not very experienced in classes and functions (oop)

Thank you in advance !

Advertisement

Answer

Looking at PySyft source code for Module. The constructor of your class parent only takes a single argument: torch_ref.

You should therefore call the super constructor with:

JavaScript

removing all arguments but torch_ref from the call.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement