You shouldn't need to modify the Softmax class, what is this for? If you had to make this modification it probably means you're passing the wrong thing to it somewhere else.