theislab / trVAE

Conditional out-of-distribution prediction
MIT License
53 stars 11 forks source link

Kernel functions with weird normalizations #5

Closed sholderbach closed 3 years ago

sholderbach commented 4 years ago

Hi guys, very interesting approach and results.

As I am trying to reimplement parts of the trVAE in pytorch I was looking into the source code and stumbled across your implementation for the kernel functions.

https://github.com/theislab/trVAE/blob/7573344910e3cef405f7544e119065d4755c9fb4/trvae/models/_utils.py#L18-L38

Is it intentional that while for the multiscale rbf the squared distances (with their respective factors) are directly plugged into the exponentiation, whilst in the 'rbf' variant it is normalized twice with mean and division by the dimension of the space?