Hi,
I want to add some minor noise to a dlnet.Learnables.
Firstly, I tried to convert each learnables from table to cell to a single dlarray by
yy = cell2mat(table2array(dlnet.Learnables(1, 3)));
zz = yy + normrnd(0, 0.005, size(yy));
But I found I could not manage to convert zz back and have it stored in dlnet.Learnables(1, 3).
Then, I tried to use dlupdate() function like
Noise_Adder = @(para, Noise_Sigma) para + normrnd(0, Noise_Sigma, size(para));
G_Add_Noise_Sigma = 0.005;
for l = 1:size(dlnet.Learnables, 1)
dlnet.Learnables(i, 3) = dlupdate(Noise_Adder, dlnet.Learnables(i, 3), G_Add_Noise_Sigma);
end
Yet I got an error saying
Dot indexing is not supported for variables of this
type.
Error in
deep.internal.recording.containerfeval>iProcessTable_Nout_Nin
(line 262)
varargvals{input} = varargin{input}.Value;
Error in
deep.internal.recording.containerfeval>iDispatch_Nout_Nin
(line 194)
[varargout{1:nargout}] =
iProcessTable_Nout_Nin(allowNetInput,
makeNetOutput, fun, paramFun, c, varargin{:});
Error in deep.internal.recording.containerfeval
(line 41)
[c, varargout{1:nargout-1}] =
iDispatch_Nout_Nin(allowNetInput,
makeNetOutput, fun, paramFun, c,
varargin{:});
Error in deep.internal.networkContainerFun (line
15)
[c, varargout{1:nargout-1}] =
deep.internal.recording.containerfeval(...
Error in dlupdate (line 102)
[P, varargout{1:nargout-1}] =
deep.internal.networkContainerFun(...
So how can I achieve my goal? Many thanks.