torchinfo icon indicating copy to clipboard operation
torchinfo copied to clipboard

multi-parameters forward function doesnt work

Open IKetchup opened this issue 1 year ago • 1 comments

Hello, first of all thank you for your amazing work.

Describe the bug I have a model with the function forward take x and y in parameters.

...
def forward(x, y):
        pred = model(x,y)
...

What part of the code should I rewrite to take this modification into account ?

IKetchup avatar Jul 24 '24 09:07 IKetchup

Try using explicit kwargs: summary(model, x=x, y=y)

Or using a tuple for input data: summary(model, input_data=(x,y)

TylerYep avatar Jul 24 '24 21:07 TylerYep