Maxpool node gets added to output of the modle
Required prerequisites
-
Make sure you've read the documentation. Your issue may be addressed there. -
Search the issue tracker and discussions to verify that this hasn't already been reported. +1 or comment there if it has.
What commit version of aidge do you use
-
aidge_core
: dev -
aidge_learning
: dev
Problem description
When creating a model with a Maxpool layer, this layer is included in the model outputs.
import aidge_core
model = aidge_core.sequential(
[
aidge_core.Conv2D(in_channels=3, out_channels=16, kernel_dims=[3, 3]),
aidge_core.ReLU(),
aidge_core.MaxPooling2D(kernel_dims=[2, 2], stride_dims=[2, 2]),
aidge_core.FC(in_channels=1024, out_channels=10, name="FC_0"), #in_channels is random here
]
)
print(list(model.get_output_nodes()))
Returns
[Node(name='', optype='FC', parents: [1, 1, 1], children: [[]]), Node(name='', optype='MaxPooling2D', parents: [1], children: [[1], []])]
Only the FC node should be in there. When using model.get_output_nodes() to get the prediction depending on the list order we might get the Maxpool node instead of the correct output.