added tanh and dtanh support, fixed bug in dsigmoid update, added functionality to a scalar by row vector