Files
2026-07-13 13:30:25 +08:00

13 lines
276 B
Matlab
Executable File

function Y = mlpPred(model, X)
% Multilayer perceptron prediction
% Input:
% model: model structure
% X: d x n data matrix
% Ouput:
% Y: p x n response matrix
% Written by Mo Chen (sth4nth@gmail.com).
W = model.W;
Y = X;
for l = 1:length(W)
Y = sigmoid(W{l}'*Y);
end