我實現了負載以驚人的速度,當我用了「-v6」選項給.MAT保存文件,像這樣:
save(matlabTrainingFile, 'Xtrain', 'ytrain', '-v6');
下面是我在我的測試中使用的矩陣的大小。 ..
Attr Name Size Bytes Class
==== ==== ==== ===== =====
g Xtest 1430x4000 45760000 double
g Xtrain 3411x4000 109152000 double
g Xval 1370x4000 43840000 double
g ytest 1430x1 11440 double
g ytrain 3411x1 27288 double
g yval 1370x1 10960 double
...而且我們實現了性能改進:
變更前:
time to load the training data: 78 SECONDS!!!
time to load validation data: 32
time to load the test data: 35
變更後:
time to load the training data: 0 SECONDS!!!
time to load validation data: 0
time to load the test data: 0
顯然的原因,這個運作良好的原因是,老版本6版本中使用較少的壓縮比的最新版本。 因此,您的文件大小將會變大,但它們會更快加載WAY。
是的,我想可能是。是否有選項用於讀取mat文件的mat文件? – mor22 2011-01-27 09:37:25
是的,http://www.mathworks.com/help/techdoc/apiref/bqoqnz0.html#bqoqn5u – 2011-01-27 14:21:06