alex.veuthey:

The best way to evaluate that is to try it


In addition, I suggest
class Net(nn.Module):
    def __init__(self, use_linear):
        super().__init__()
        self.use_linear = use_linear
        self.conv_layer = nn.Conv2d(3, 3, 1)
        if self.use_linear:
            self.linear_layer = nn.Linear(12, 8)
    def forward(self, x):
        x = self.conv_layer(x)
        return self.linear_layer if self.use_linear else x