I am planning on learning Pytorch. However at this stage I would like to ask a question so that I can understand some code I am reading

When you have a class whose base class is `nn.Module` say

```
class My_model(nn.Module)

```

how are inferences supposed to be run there?

In the code I am reading it says

```
tasks_output, other = my_model(data)

```

Wouldn't that just be creating an object? (like calling the class constructor)

How, in pytorch, are inference supposed to be made?

(for reference I am talking when `my_model` is set to `my_model.eval()`)

EDIT: My apologies. I made the mistake of declaring the class and object as one.. I corrected the code