Closed JesusPinedaC closed 1 month ago
Consider a sequential model composed of a CNN and an MLP:
from deeplay import ConvolutionalNeuralNetwork, MultiLayerPerceptron, Sequential cnn = ConvolutionalNeuralNetwork( in_channels=1, hidden_channels=[32, 64], out_channels=96, out_activation=nn.ReLU ) mlp = MultiLayerPerceptron( in_features=None, hidden_features=[64], out_features=96, out_activation=nn.ReLU ) model = Sequential(cnn, mlp)
This default model works correctly. The problem arises when configuring the MLP.
For example, when expanding the number of hidden features:
model[1].configure(hidden_features=[32, 64])
Until this point, everything works correctly:
MultiLayerPerceptron( (blocks): LayerList( (0): LinearBlock( (layer): Layer[LazyLinear](out_features=32, bias=True) (activation): Layer[ReLU]() ) (1): LinearBlock( (layer): Layer[Linear](in_features=32, out_features=64, bias=True) (activation): Layer[ReLU]() ) (2): LinearBlock( (layer): Layer[Linear](in_features=64, out_features=96, bias=True) (activation): Layer[ReLU]() ) ) )
But when creating (or building) the model, it breaks:
(1): MultiLayerPerceptron( (blocks): LayerList( (0): LinearBlock( (layer): LazyLinear(in_features=0, out_features=32, bias=True) (activation): ReLU() ) (1): LinearBlock( (layer): Linear(in_features=32, out_features=64, bias=True) (activation): ReLU() ) (2): LinearBlock( (layer): Linear(in_features=64, out_features=96, bias=True) (activation): ReLU() ) (3): LinearBlock( (layer): Linear(in_features=32, out_features=64, bias=True) (activation): ReLU() ) (4): LinearBlock( (layer): Linear(in_features=64, out_features=96, bias=True) (activation): ReLU() ) ) )
This issue was tested on a brand-new Linux machine with a fresh installation of deeplay
Closed with PR #122
Consider a sequential model composed of a CNN and an MLP:
This default model works correctly. The problem arises when configuring the MLP.
For example, when expanding the number of hidden features:
Until this point, everything works correctly:
But when creating (or building) the model, it breaks:
This issue was tested on a brand-new Linux machine with a fresh installation of deeplay