Closed sdemarch closed 18 hours ago
It might make sense to transform AbsNeuralNetwork
into a wholly abstract class, requiring the implementation of forward
and backward
methods. Subsequently, we would have AbsSeqNetwork
and AbsAcyclicNetwork
, both inheriting from AbsNeuralNetwork
as well as their respective counterparts in networks.py
(SequentialNetwork
and AcyclicNetwork
). This approach ensures the inheritance of all node management methods, mitigating redundancy in the codebase.
To make this approach work we will need to complete the planned refactoring in node.py (#24) and networks.py (#23).
Should it be the case that, instead of a method build_abs_network
in verification.py
, the same procedure is the abstract class constructor in abstraction.py
? It is (and should) never the case that an abstract network is initialized without the complete concrete network.
TL;DR AbsSeqNetwork
init method should contain the code of __build_abs_seq_network
?
We decided to structure the module as follows:
abstraction
a package with submodules networks
for abstract elements and networks, and layers
for abstract layersLayerNode
with only the identifier as a parameter, and have AbsLayerNode
and ConcreteLayerNode
objects inherit from it (nodes.py
). AbsLayerNode
will contain a reference to their concrete counterpart, and the forward
and backward
methods (abstraction.layers.py
).NeuralNetwork
representing a graph, and the classes SequentialNetwork
and AcyclicNetwork
as children specializing it (networks.py
). IAbstractNetwork
to provide forward
and backward
methods to concrete classes AbsSequentialNetwork
and AbsAcyclicNetwork
which will inherit from the interface and their concrete counterpart.
Restructure the module abstraction.py to handle abstract interpretation objects and methods