|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
下面程序中~符号代表什么意思?
- function [loss] = nneval(nn, loss, train_x, train_y, val_x, val_y)
- %NNEVAL evaluates performance of neural network
- % Returns a updated loss struct
- assert(nargin == 4 || nargin == 6, 'Wrong number of arguments');
- % training performance
- nn = nnff(nn, train_x, train_y);
- loss.train.e(end + 1) = nn.L;
- % validation performance
- if nargin == 6
- nn = nnff(nn, val_x, val_y);
- loss.val.e(end + 1) = nn.L;
- end
- %calc misclassification rate if softmax
- if strcmp(nn.output,'softmax')
- [er_train, ~] = nntest(nn, train_x, train_y);
- loss.train.e_frac(end+1) = er_train;
- if nargin == 6
- [er_val, ~] = nntest(nn, val_x, val_y);
- loss.val.e_frac(end+1) = er_val;
- end
- end
- end
复制代码 |
|