split out regularizer code
disabled gpu axis swap for now