code/src/math/Functions.java
public static Vector softMax(Vector that) {
		
		Vector vector = new Vector(that.getLength());
		
		//compute sum (1 -> z) e^z
		
		float sum = 0f;
		for (int i = 0; i < that.getLength(); i++) {
			sum += (float) Math.exp(that.getValue(i));
		}
		
		//compute e^z / sum
		
		for (int i = 0; i < that.getLength(); i++) {
			vector.setValue(i, (float) Math.exp(that.getValue(i)) / sum);
		}
		
		return vector;
	}
//Softmax Function (just Vector)
Softmax Function (just Vector)
Softmax Function ( just Vector )
public static Vector softMax(Vector that) {
		Vector vector = new Vector(that.getLength());
		float sum = 0f;
		for (int i = 0; i < that.getLength(); i++) {
			sum += (float) Math.exp(that.getValue(i));
		}
		for (int i = 0; i < that.getLength(); i++) {
			vector.setValue(i, (float) Math.exp(that.getValue(i)) / sum);
		}
		return vector;
	}
public static Vector softMax ( Vector that ) { Vector vector = new Vector ( that . getLength ( ) ) ; float sum = 0f ; for ( int i = 0 ; i < that . getLength ( ) ; i ++ ) { sum += ( float ) Math . exp ( that . getValue ( i ) ) ; } for ( int i = 0 ; i < that . getLength ( ) ; i ++ ) { vector . setValue ( i , ( float ) Math . exp ( that . getValue ( i ) ) / sum ) ; } return vector ; }
Softmax Function (just Vector)
Softmax Function ( just Vector )
//compute sum (1 -> z) e^z //compute e^z / sum