Skip to content

Commit

Permalink
FIX(tissue_weight)
Browse files Browse the repository at this point in the history
  • Loading branch information
brudfors committed Mar 16, 2022
1 parent 27748bf commit 50b3d9e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spm_mb_classes.m
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,13 @@

%==========================================================================
function [delta,dE] = update_delta(delta,mu,P,del_settings,accel)
% disp(exp(delta)/sum(exp(delta)))
K = size(mu,4);
L = (eye(K)-1/(K+1))*del_settings;
H = L;
g = L*delta(:);
for k=1:size(mu,3)
[g1,H1] = gradhess1(mu(:,:,k,:),P(:,:,k,:),accel);
[g1,H1] = gradhess1(mu(:,:,k,:),P(:,:,k,:),delta,accel);
g = g + double(reshape(sum(sum(g1,1),2),[K 1]));
H = H + double(reshape(sum(sum(H1,1),2),[K K]));
end
Expand Down

0 comments on commit 50b3d9e

Please sign in to comment.