Closed julianhoever closed 3 months ago
I'm not sure i agree. For testing purposes and modularity, i like the two to be separated. But i agree that adding Module
there would communicate intent better. What do you think about introducing a DesignCreatorModule
or just CreatorModule
(that users should inherit from) and keep the DesignCreator
as is?
The abstract class
DesignCreator
should also inherit fromtorch.nn.Module
because it is used to ensure that atorch.nn.Module
always have acreate_design
function for translation. Therefore it is mostly used in combination with atorch.nn.Module
.https://github.com/es-ude/elastic-ai.creator/blob/662e45aaaa1c70bb1ffb9e30f69a389289000d44/elasticai/creator/vhdl/design_creator.py#L6-L8
In addition in the
Sequential
class we assume that submodules of typeDesignCreator
passed to the constructor are alsotorch.nn.Module
, because we cast them totorch.nn.Module
which is not possible if the submodules of typeDesignCreator
not inherit fromtorch.nn.Module
.https://github.com/es-ude/elastic-ai.creator/blob/662e45aaaa1c70bb1ffb9e30f69a389289000d44/elasticai/creator/nn/sequential/layer.py#L12-L27
Perhaps the name
DesignCreator
is not a good choice.