Skip to content

ExplaiNNTrunk.__init__ missing super().__init__() call #188

@Shreya-droid

Description

@Shreya-droid

Bug description:
ExplaiNNTrunk fails to initialize because super().__init__() is missing
from its __init__ method, causing the following error:

AttributeError: cannot assign module before Module.init() call

To reproduce:
from grelu.model.models import ExplaiNNTrunk
t = ExplaiNNTrunk(in_len=200, channels=128, kernel_size=19)

Error:
File "grelu/model/trunks/explainn.py", line 92, in init
self.blocks = nn.ModuleList()
AttributeError: cannot assign module before Module.init() call

Expected behavior:
ExplaiNNTrunk should initialize successfully.

Fix:
In grelu/model/trunks/explainn.py, add super().__init__() as the first
line of ExplaiNNTrunk.init(), before self.channels = channels.

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