2021222324252627
* @return derivative of softmax, has the same formula as sigmoid :) */ @Override public DoubleMatrix derivativeAt(DoubleMatrix X) { DoubleMatrix M = valueAt(X); return M.mul((M.mul(-1)).addi(1)); } }
1920212223242526
* @return sigmoid_prime = M.*(1-M), where M = sigmoid(X); */ @Override public DoubleMatrix derivativeAt(DoubleMatrix X) { DoubleMatrix M = valueAt(X); return M.mul((M.mul(-1)).addi(1)); } }