define min and max

Define min and max for NNLayer type