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

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!

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Deep Learning Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by