function p = predict(Theta1, Theta2, X, steepness)
%PREDICT Predict the label of an input given a trained neural network
%   p = PREDICT(Theta1, Theta2, X) outputs the predicted label of X given the
%   trained weights of a neural network (Theta1, Theta2)

% Useful values
m = size(X, 1);
num_labels = size(Theta2, 1);

% Layer 1
layer1 = [ X ones(size(X,1) ,1)];
% Layer 2  
    
layer2 = sigmoid(layer1*(Theta1'),steepness);
    
layer2 = [ layer2 ones(size(layer1,1),1)];
    
%     layer3 = sigmoid(layer2*Theta2');
%      
%     layer3 = [ layer3 ones(size(layer2,1),1)];

% Final
output = sigmoid(layer2*(Theta2'),steepness);

[K,p] = max(output,[],2);
    
clear layer1 layer2 output K Y;
    

% =========================================================================

end
