Fix adaptive step size to work with NNlayer types

Fix adaptive step size to work with NNlayer types and add definition of
sign for NNlayer type