changes to remove IntPtr for Softmax stateful case