make maxnorm reg general for mlp and tdmlp