Added regularizer
Changed ScalarType to float