From 47ebe39054c05994ec426df9148a62a61d824ff8 Mon Sep 17 00:00:00 2001 From: "Eric V. Strobl" Date: Tue, 4 Mar 2014 16:53:47 -0500 Subject: [PATCH] Update nnff.m rectified linear units and softplus --- NN/nnff.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NN/nnff.m b/NN/nnff.m index 32a2c69..03ca9ec 100644 --- a/NN/nnff.m +++ b/NN/nnff.m @@ -17,6 +17,10 @@ nn.a{i} = sigm(nn.a{i - 1} * nn.W{i - 1}'); case 'tanh_opt' nn.a{i} = tanh_opt(nn.a{i - 1} * nn.W{i - 1}'); + case 'relu' + nn.a{i} = max(0,nn.a{i - 1} * nn.W{i - 1}'); + case 'softp' + nn.a{i} = log(1+exp(nn.a{i - 1} * nn.W{i - 1}')); end %dropout