Ah, that would stop certain dimensions from changing, but the output would still be the same size.
Or something like that.
Take a simple NN with 3 layers: 5 neurons in the input layer, 3 in the hidden and 1 output.
Force inputs to neuron 4 and 5 in the hidden layer to be zero, and force inputs to neurons 2-5 to be zero in the output layer (and ignore their output). I'm assuming the transfer function obeys f(0) = 0, if not, fix output to zero as well.
My thought was this would be similar to how you enforce boundary conditions when solving partial differential equations by directly setting the value of certain matrix elements before running the solver.
Again, may be completely silly.