Skip to content

Commit

Permalink
avoid full matrices in svd init
Browse files Browse the repository at this point in the history
  • Loading branch information
Dong555 committed Nov 11, 2022
1 parent 7f5c1d7 commit f8995c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion susiepca/infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def init_params(

if init == "pca":
# run PCA and extract weights and latent
svd_result = jnp.linalg.svd(X - jnp.mean(X, axis=0))
svd_result = jnp.linalg.svd(X - jnp.mean(X, axis=0), full_matrices=False)
init_mu_z = svd_result[0] @ jnp.diag(svd_result[1])[:, 0:z_dim]
elif init == "random":
# random initialization
Expand Down

0 comments on commit f8995c8

Please sign in to comment.