Resetting connection in neural networks

Thanks for code.
I tried to create a small reproducible code snippet and it just seems the base class’ reset_ is called, which does nothing, since it’s implemented as a pass:

class AbstractConnection(ABC, nn.Module):
    def __init__(self):
        super(AbstractConnection, self).__init__()
        
    @abstractmethod
    def reset_(self):
        print("base class called")
    
class Connection(AbstractConnection):
    def reset_(self):
        super().reset_()


con = Connection()
con.reset_()
> base class called

Is this method implemented in another using other options than the super().reset_() call?

1 Like