I have to admit that I’m still confused. I’m sorry, I’m just learning OOP in python. I want my extended class to have two extra attributes that are not modules for feedforward.
Those two attributes are the optimizer and the loss criterion. I don’t want them to be part of the layer/module pipeline. I just want them as attributes for use in my training method.
An additional problem is that I don’t want to have to initialize the the object with pre-existing modules. Rather, I want to declare the object with the layers tuple, and have the modules dynamically generated the modules based off that tuple. In your example, you have initialized the object with two Conv2d layers, which is the opposite of what I am trying to achieve.
Where can I declare attributes so that they DO NOT end up as modules? I thought all unique child attributes were supposed to be declared in the __init__ method. After declaring the unique child attributes, I thought you called super().__init__() in order to have the parent class finish filling out the object.