Forward propagation for Feed-forward Back-Propagation Network (New)
Input data
Network object which contains the parameters of the trained network.
Output prediction
Internal caches for study purpose
This function implement forward path for the model created with nn_train based on Andrew Ng's Coursera Deep-Learning Specialization Course.
P = [1 2 3 4; 1 2 3 4]./2 - 1; // Simple Normalization Tc = [1 2 3 4]; T = nn_onehot(Tc); // Convert to one-hot encoding N = [2,3,4]; af = ['ann_relu','ann_softmax']; num_iterations = 200; net = initialize_parameters(N,[-0.01,0.01],af); net.mini_batch = 1; net.cost_type = 'categorical_crossentropy'; net.lr = 0.05; net.l2 = 0.01; net = nn_train(net,P,T,num_iterations); y = model_forward(P, net); [maxV, maxI] = max(y,'r') disp(maxI); | ![]() | ![]() |