scvi-tools icon indicating copy to clipboard operation
scvi-tools copied to clipboard

Activation functions other than ReLU

Open Koncopd opened this issue 3 years ago • 3 comments

Is there a way to pass an activation function class to SCVI? I don't see it in the arguments. I am trying to use differential geometry to analyze the manifold of VAE latent spaces and ReLU seems to break the approach.

Koncopd avatar Apr 15 '22 14:04 Koncopd

Internally, yes

https://github.com/scverse/scvi-tools/blob/5496b993b07e94ac4a6f111589d61a34154bb126/scvi/nn/_base_components.py#L69

From the user-facing API, not really. You'd have to make the activation_fn a kwarg of the VAE class

adamgayoso avatar Apr 15 '22 15:04 adamgayoso

Yes, thx, this i saw already. But i really would prefer to use the base SCVI, not custom reimplementation. I can make a PR with this option, would it be fine?

Koncopd avatar Apr 15 '22 15:04 Koncopd

yes, sounds good, so long as the PR adds activation_fn to the init of VAE

adamgayoso avatar Apr 15 '22 15:04 adamgayoso

Closed via #1986

martinkim0 avatar May 18 '23 22:05 martinkim0