How can I constraint a layer input to [0,1]?

I have a nonlinear activation function that induces nonlinearity in the domain range of [0,1], so Id like to have the input be in that range. the input to this nonlinear layer is from a nn.Linear layer. batchnorm1d doesnt seem to do the job

Use sigmoid, clamping or rescaling. Depending on the problem you are facing.