ruihangdu / Decompose-CNN

CP and Tucker decomposition for Convolutional Neural Networks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

parafac function error

yfji opened this issue · comments

commented

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

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,