Singular value decomposition, Cant get the final results
조회 수: 1 (최근 30일)
이전 댓글 표시
Im trying to Perform SVD as the following, My laptop RAM is 64GB
The XTrain size is 120*120*1*39000
I tried to reduce the number of matrices to 120*120*1*10000, but still getting the same message
But the MATLAB stucks in this message and the evaluation percentage doesnt increase, any suggestion please?
N=14;
X=reshape(XTrain,[], size(XTrain,4)).';
size(X)
vn=max([vecnorm(X,inf,1),1],1);
%Process as tall
T=tall([X, ones(height(X),1)]./vn);
clear X
[~,~,V]=svd( T , "econ");
clear T
Abt=gather( head( V(:,end+1-N:end)) ) ./vn';
A=Abt(1:end-1,:)';
b=Abt(end,:)';
s=vecnorm(A,2,2);
[A,b]=deal(A./s, b./s);
Message
Evaluating tall expression using the Parallel Pool 'Processes':
- Pass 1 of 2: Completed in 7.1 sec
Evaluation 45% complete
댓글 수: 8
Torsten
2023년 11월 29일
Your question was
But the MATLAB stucks in this message and the evaluation percentage doesnt increase, any suggestion please?
My advice was: Contact Technical Support.
If your question was: Do you know if I do something wrong ? How can I get the affine subspace and the Grassman manifold ? - then I'm not able to contribute something.
채택된 답변
Matt J
2023년 11월 30일
이동: Matt J
2023년 11월 30일
Since you are now on a more powerful computer with more RAM, perhaps you should also try doing the SVD without tall arrays.
Regardless, you should probably clear XTrain from memory as soon as it is no longer needed,
X=reshape(XTrain,[], size(XTrain,4)).'; clear XTrain
so as to maximize available RAM.
You might also consider using single floats to reduce RAM consumption as well,
X=reshape(single(XTrain),[], size(XTrain,4)).'; clear XTrain
although I am not sure what impact the reduced precision will have on the SVD results.
댓글 수: 2
Matt J
2023년 11월 30일
편집: Matt J
2023년 11월 30일
Thanks Matt, This worked.
I'm glad, but please Accept-click the answer to indicate so.
But I am wondered how it's working and the tall array which is supposed to work in less memory is not working.
We don't know that it is "not working" with tall arrays. It's possible you didn't wait long enough.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!