Hua-Zhou / TensorReg

Matlab toolbox for tensor regressions
http://hua-zhou.github.io/TensorReg/
27 stars 9 forks source link

bug when starting point is a full array or tensor #1

Closed Hua-Zhou closed 7 years ago

Hua-Zhou commented 7 years ago

Reported by Xiwei Tang.

kruskal_reg(X, M, y, r, 'normal', 'B0', Bint)

report error

Error using horzcat
Dimensions of matrices being concatenated are not consistent.

if Bint is supplied as a full array or a full tensor.

Hua-Zhou commented 7 years ago

The reason is that internally the kruskal_reg function first does a CP decomposition of Bint which outputs a ktensor with U being a d x 1 cell array, while the algorithm expects a 1 x d cell array.

Hua-Zhou commented 7 years ago

Fixed in commit 50d16a6fe6f0810e2f7eb21f50e8e015fb11c206 and tag v1.0.2