Skip to content

Commit

Permalink
Modify computation outer tensor-vector products
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmul1114 committed Nov 28, 2023
1 parent f869de6 commit a933580
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/gcp-opt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,7 @@ function mttkrp(X, U, n)
sz = size(Rn_j)
m = length(sz)
for k in n-1:-1:1
Rn_j = reshape(Rn_j, prod(sz[1:m-1]), sz[m])
Rn_j = Rn_j * U[k][:, j]
Rn_j = reshape(Rn_j, prod(sz[1:m-1]), sz[m]) * U[k][:, j]
m -= 1
end
Rn[:, j] = Rn_j
Expand Down

0 comments on commit a933580

Please sign in to comment.