Created
October 25, 2021 08:36
-
-
Save tamnguyenvan/4fe23d840bd091c069918e1f150d50b7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from pyfaust.fact import palm4msa | |
| from pyfaust.factparams import ParamsPalm4MSA, ConstraintList, StoppingCriterion | |
| import numpy as np | |
| # M = np.random.rand(500, 32) | |
| # M = np.arange(500*32).reshape((500, 32)).astype('float64') | |
| M = np.arange(100).reshape((10, 10)).astype('float64') | |
| print(M) | |
| # cons = ConstraintList('splin', 5, 500, 32, 'normcol', 1.0, 32, 32) | |
| cons = ConstraintList('sp', 20, 10, 10, 'sp', 20, 10, 10) | |
| stop_crit = StoppingCriterion(num_its=200) | |
| param = ParamsPalm4MSA(cons, stop_crit) | |
| F = palm4msa(M, param, backend=2020) | |
| print(F.todense()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment