deepsphere / deepsphere-cosmo-tf1

A spherical convolutional neural network for cosmology (TFv1).
https://arxiv.org/abs/1810.12186
MIT License
131 stars 30 forks source link

Tesorflow 2.0 upgrade + question #33

Closed aurelio-amerio closed 3 years ago

aurelio-amerio commented 4 years ago

Hello, I've found this incredible project and would like to use it, but it has been a while since it has been updated. Is there somebody who is working on porting this project to Tensorflow 2.0, maybe implementing Keras layers? Is there any interest in doing it?

I would also like to ask how does this work compare to https://github.com/ai4cmb/NNhealpix Is the implementation equivalent or different? From what I can understand the implementation of this model seems much more complex, if compared to just reordering the pixels and doing a 1D convolution. Is this model supposed to achieve better performance / generalization?

Thank you very much

nperraud commented 4 years ago

Hi @aurelio-amerio , Thanks for your interest. Eventually DeepSphere will be to Tensorflow 2 (with a keras layer), but it might take a long time since I need to find a student to do it.

Of course, if you want to do it, I will provide all the help I can. Note that they are other implementations of DeepSphere, including one in PyTorch: https://github.com/deepsphere/deepsphere-pytorch

Regarding your second question, yes DeepSphere is indeed much more involved as it is much more spherical invariant. In fact, we compare to traditional (deformed) 2d convolution in the paper and to our surprise, 2D convolution is not as powerful as DeepSphere. NNhealpix is very similar to doing 2D convolution.

Good luck

mdeff commented 3 years ago

Thanks for your kind words @aurelio-amerio. A TensorFlow 2.0 implementation with layers is now available at https://github.com/deepsphere/deepsphere-cosmo-tf2. 🙂

The main issue of https://github.com/ai4cmb/NNhealpix, on top of lower performance, is that it gives no invariance guarantee: a rotation of your observations on the sphere will yield another prediction. Guaranteeing and exploiting this invariance is what gives DeepSphere better performance and generalization, because it's as if it was trained on every rotations of your data.