ruihangdu / Decompose-CNN

CP and Tucker decomposition for Convolutional Neural Networks
75 stars 21 forks source link

parafac function error #3

Open yfji opened 4 years ago

yfji commented 4 years ago

Hi. I test the CP decomposition and I met a mistake returned by parafac: last, first, vertical, horizontal = parafac(W, rank=rank, init='random') ValueError: not enough values to unpack (expected 4, got 2) I checked the returns of parafac, which should be a tensor. The version of tensorly is 0.4.5

loki-veera commented 3 years ago

This error is because in newer version of parafac it returns norms and factors, so change your statement to last, first, vertical, horizontal = parafac(W, rank=rank, init='random')[1].Then this return four factors,