Skip to content

Chain products #3

Description

@amasotti

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions