Closed sdemarch closed 2 months ago
We need to keep in mind that if we use the classes of networks.py
also as containers of nodes defined in abstraction.py
we need to do one of two things:
in_dims
, out_dims
. Maybe by inheriting from the corresponding concrete node instead of keeping it as an attribute? Keeping it as an attribute is kind of useful because it keep separate the info regarding the original concrete node from the info needed for the abstract transformer forward.P.s. the overlapping of the nomenclature between abstract interpretation and abstraction in programming is agony.
I think the best solution is to do the same thing as for the AbsNeuralNetwork
classes as you say in pt. 2. We make the base class AbsLayerNode
acting as an interface and then all "concrete abstract" layers inheriting from both the interface and their respective concrete reference node.
EDIT: this cannot work since LayerNode
s constructors would affect the building of AbsLayerNode
s
I also think that it can be safe and self-healing to refer to wholly abstract classes as Interfaces
Cfr. #25
Also, we implement a getter for in_dim
in single-input layers and out_dim
for completeness. It performs nothing, but is the right way to structure the interface of the classes
Restructure the module nodes.py to represent single- and multi-input/output layers