Why is the running time greatly increased after using Ctrl+C on a neural network?
Show older comments
I'm using a neural network with autoencoders to classify images. The first time I ran the code, it took 1 hour. After multiple times of running and aborting the program midway using Ctrl+C, I've noticed the same code takes much longer to run, or won't run at all (with the error being that there is not enough memory space). I manually deleted the files in the tempdir directory thinking that maybe matlab was saving variables in the temporary file and wasn't clearing them out after ctrl+c. The program now runs for 2 1/2 hours. Any idea why this is happening and how I can get back to the 1 hour run time? Thanks!
Answers (1)
Walter Roberson
on 16 May 2016
close('all')
clear all
delete( findall(0, 'type', 'figure') )
pack
4 Comments
Greg Heath
on 17 May 2016
I am more than a little confused:
1. How does close('all') differ from close all?
The former is not in the help or doc descriptions
2. How does clear all differ from
clear('all')?
3. Why is the delete statement needed?
Glassy eyed,
Greg
Walter Roberson
on 17 May 2016
close all is the "command function equivalence" form of close('all'), and clear all is the "command function equivalence" of clear('all') . That is, anything of the form
FunctionName Word
is equivalent to calling FunctionName('Word')
The delete statement is there to get rid of any active graphics, as clear all does not remove graphics.
Greg Heath
on 20 May 2016
I thought close all removed graphics.
I generally start my programs with
close all, clear all, clc, tic
Any comments or suggestions re this?
Greg
Walter Roberson
on 20 May 2016
I was confusing close with fclose.
fclose all
close all hidden
I never use "clear all" though: it clears too much.
Categories
Find more on Web Services 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!