You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The abstract class DesignCreator should also inherit from torch.nn.Module because it is used to ensure that a torch.nn.Module always have a create_design function for translation. Therefore it is mostly used in combination with a torch.nn.Module.
In addition in the Sequential class we assume that submodules of type DesignCreator passed to the constructor are also torch.nn.Module, because we cast them to torch.nn.Module which is not possible if the submodules of type DesignCreator not inherit from torch.nn.Module.
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
.elastic-ai.creator/elasticai/creator/vhdl/design_creator.py
Lines 6 to 8 in 662e45a
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
.elastic-ai.creator/elasticai/creator/nn/sequential/layer.py
Lines 12 to 27 in 662e45a
Perhaps the name
DesignCreator
is not a good choice.The text was updated successfully, but these errors were encountered: