pinv function is supported for dlarray input while the pageinv function is not supported

In the deep learning pipeline, I want to use inverse operation on every page of 3D dlarray object. I have tried pageinv function. I find that the pageinv function is not supported for dlarray object while the pinv function is supported for dlarray object.
what is the best practice to obtain the inverse of every page in a 3D dlarray object ?
dlA = dlarray(rand(3,3,10));
dlInv1 = pinv(dlA(:,:,1))
% pageinv(dlA)

I have used cellfun to inverse every page.
dlC = num2cell(dlA,[1 2]); % [1,1,B] cell array
dlInvB = cell2mat(cellfun(@pinv,dlC,"UniformOutput",false));
isequal(dlInvB(:,:,1),dlInv1)In the deep learning pipeline, I want to use inverse operation on every page of 3D dlarray object. I have tried pageinv function. I find that the pageinv function is not supported for dlarray object while the pinv function is supported for dlarray object.
what is the best practice to obtain the inverse of every page in a 3D dlarray object ?
dlA = dlarray(rand(3,3,10));
dlInv1 = pinv(dlA(:,:,1))
% pageinv(dlA)

I have used cellfun to inverse every page.
dlC = num2cell(dlA,[1 2]); % [1,1,B] cell array
dlInvB = cell2mat(cellfun(@pinv,dlC,"UniformOutput",false));
isequal(dlInvB(:,:,1),dlInv1) In the deep learning pipeline, I want to use inverse operation on every page of 3D dlarray object. I have tried pageinv function. I find that the pageinv function is not supported for dlarray object while the pinv function is supported for dlarray object.
what is the best practice to obtain the inverse of every page in a 3D dlarray object ?
dlA = dlarray(rand(3,3,10));
dlInv1 = pinv(dlA(:,:,1))
% pageinv(dlA)

I have used cellfun to inverse every page.
dlC = num2cell(dlA,[1 2]); % [1,1,B] cell array
dlInvB = cell2mat(cellfun(@pinv,dlC,"UniformOutput",false));
isequal(dlInvB(:,:,1),dlInv1) dlarray, pageinv, inv MATLAB Answers — New Questions

​

Leave a Reply

Your email address will not be published. Required fields are marked *