Skip to content

Wrong reconstruction of tucker decomposition #299

Answered by mhelal
mhelal asked this question in Q&A
Discussion options

You must be logged in to vote

Thank you and sorry for replying late,

The last two problems are both solved by converting:
reconstructed = tl.tucker_to_tensor(core, factors)
to

reconstructed = tl.tucker_to_tensor((core, factors))

such that the error "ValueError: too many values to unpack (expected 2)" is solved by sending 2 values to unpack in the "tucker_tensor" argument

The problem of compressing and using a smaller rank than the original tensor is as follows:

tensor = tl.tensor([[ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.],
                        [ 0.,  0.,  0.,  0.,  1.,  1.,  1.,  1.,  0.,  0.,  0.,  0.],
                        [ 0.,  0.,  0.,  0.,  1.,  1.,  1.,  1.,  0.,  0.,  0.,  0.],
     …

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@JeanKossaifi
Comment options

Comment options

You must be logged in to vote
4 replies
@JeanKossaifi
Comment options

@merajhashemi
Comment options

@merajhashemi
Comment options

@mhelal
Comment options

Answer selected by JeanKossaifi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants