Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chain products #3

Open
amasotti opened this issue Mar 20, 2021 · 0 comments
Open

Chain products #3

amasotti opened this issue Mar 20, 2021 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@amasotti
Copy link
Owner

Matlab and Python seem to handle matrix multiplication quite differently.
The weights in the C-space, for example, are computed according to the following formula:

TP^T x W x TP

implemented in MATLAB as:

TP'*W*TP

and in Python as:

# with numpy 
TP.T @ W @ TP

# with pytorch
TP.T.matmul(W).matmul(TP) 

With identical TP, TP^T and W matrices these products give slightly differently results. Although the sum of values per row/col is the same, the single values in the matrices are differently distributed.

I wonder if this is an issue for the GSC implemented here or whether this is just a by-product of different algorithms used in Matlab and Python but doesn't affect the final result.

@amasotti amasotti added the help wanted Extra attention is needed label Mar 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant