Previously accessible file is now inaccessible.
Show older comments
Hi everyone, I was using deep learning toolbox to train a CNN. After I edit my code (which can successfully run), it shows the following wrong message "Previously accessible file "inmem:///deep_learning/tpc723775a_5df4_4b61_96f1_552a4a17e7e2.m" is now inaccessible."
Previously accessible file "inmem:///deep_learning/tp7a8bcbea_11cf_4603_8ba8_f6278a23f4fa.m" is now inaccessible.
Error in deep.internal.recording.convert.tapeToFunction>@(varargin)fcnWithConstantsInput(varargin{:},constants) (line 37)
fcn = @(varargin)fcnWithConstantsInput(varargin{:},constants);
Error in deep.internal.AcceleratedOp/backward (line 69)
[varargout{1:op.NumGradients}] = backwardFun(varargin{:});
Error in deep.internal.recording.RecordingArray/backwardPass (line 89)
grad = backwardTape(tm,{y},{initialAdjoint},x,retainData,false,0);
Error in dlarray/dlgradient (line 132)
[grad,isTracedGrad] = backwardPass(y,xc,pvpairs{:});
Error in test_modelGradients320 (line 14)
[gradientsSubnet,gradientsParams] = dlgradient(loss,dlnet.Learnables,fcParams);
Error in deep.internal.dlfeval (line 17)
[varargout{1:nargout}] = fun(x{:});
Error in dlfeval (line 40)
[varargout{1:nargout}] = deep.internal.dlfeval(fun,varargin{:});
Error in test_siamese320 (line 126)
[gradientsSubnet,gradientsParams,loss] = dlfeval(@test_modelGradients320,dlnet,fcParams,dlX1,dlX2,pairLabels,name);
Actually, I didn't find so named file existing anywhere in my computer. I have searched and tried all potential solutions but still cannot solve this problem. The most terrible thing is that it still doesn't work even if I rewrite the code in a new script.
I was using win10+matlab 2021b. Hope for any helpful solutions, thank you!
8 Comments
VBBV
on 22 Mar 2022
deactivate any antivirus softwares in your system, firewalls could prevent access. Check with it
Cloud Wind
on 22 Mar 2022
Richard
on 22 Mar 2022
The file that this error references is one that Deep Learning Toolbox generates internally. It is only ever held in memory, so you will not be able to find it on a disk.
From the error it looks like one part of the software has cleared it from memory while another part is still trying to use it. This should not be happening, so it is likely to be a bug in Deep Learning Toolbox.
Can you provide a full set of reproduction steps that consistently reproduce the problem when run in a freshly-started MATLAB? There is a good chance that there is a workaround, but we would also like to find and fix the bug in a future version.
Cloud Wind
on 23 Mar 2022
Richard
on 23 Mar 2022
Thanks for the update @Cloud Wind, all information is potentially useful for tracking this down. Copying/renaming the original MATLAB files alone should not cause this, but doing those kinds of file operations could be interacting with network objects that have already been created and exist at the time in a running MATLAB. If you able to share scripts and functions that you run to cause the issue then this would definitely help us work out the issue.
The errot itself is related to performance optimizations within the dlnetwork class. You should be able to prevent it by specifying ("Acceleration", "none") as an additional parameter-value pair when you call forward on the network, i,.e.:
Y = forward(net, X, "Acceleration", "none")
(Obviously this may also have an adverse impact on performance, unfortunately)
Cloud Wind
on 23 Mar 2022
Edited: Cloud Wind
on 24 Mar 2022
Richard
on 24 Mar 2022
@Cloud Wind thanks for the code, I think this will be very helpful for us in understanding the exact nature of the issue.
For now, the best suggestion I have is to continue using Acceleration="none".
Accepted Answer
More Answers (0)
Categories
Find more on Deep Learning for Image Processing 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!