Error when using a custom transfer function in neural network toolbox in MATLAB.

2 views (last 30 days)
Hi,
I defined a custom transfer function (named softplus) which is y = log(1+exp(x)) following this instruction:
But when I define the network with this transfer function, I got this error information below:
Undefined function 'exp' for input arguments of type 'char'.
Error in softplus (line 5)
y = log(1+exp(x));
Error in network/subsasgn>getDefaultParam (line 2048)
param = struct(feval(fcn,'defaultParam'));
Error in network/subsasgn>setLayerTransferFcn (line 1224)
net.layers{i}.transferParam = getDefaultParam(transferFcn);
Error in network/subsasgn>network_subsasgn (line 208)
if isempty(err), [net,err] = setLayerTransferFcn(net,i,transferFcn); end
Error in network/subsasgn (line 13)
net = network_subsasgn(net,subscripts,v,netname);
Does anyone have idea what is going on here?
Thanks in advance!

Answers (0)

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!