Skip to content

AE forward function #247

@arnaudbore

Description

@arnaudbore

We have a small problem of "good python" here, because in the super model class (MainModelAbstract), the forward method is:

def forward(self, inputs, streamlines):
raise NotImplementedError
So your child class does not fit with the super. It will still run because your forward superseeds the parent's class's forward. But it's not "nice python", it creates warning in the editor. We could simply delete the two lines here:

https://github.com/scil-vital/dwi_ml/blob/3ebc194fbf3de62c22e266aef4ebc10ab97144b9/dwi_ml/models/main_models.py#L210C5-L211C34

But then in the trainer, it might complain that the 'forward' does not exist.

The other method is to manage with *args, **kwargs.

Please add an issue with this, I will manage one day, it's ok for now.

#220

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions