ATHENA, Fortran neural network library - 3D convolutional layers

Dear all,

Over the past few months, I have been working on a neural network library within Fortran (called ATHENA - Adaptive Training for High Efficiency Neural Network Applications), with a focus on implementing 3D convolutional neural networks for 3D data analysis, such as atomic charge densities. I now feel that it is in a state where it might be useful for (and understandable/usable by) others.

The GitLab repository does have an attached wiki that I intend on updating to make its use more clear.

I started this project as I couldn’t find a 3D convolutional neural network solver in Fortran and felt that I might be able to make something myself. I developed it in isolation, but, later on, came across the Neural Fortran project (https://github.com/modern-fortran/neural-fortran), from which I drew some inspiration and ideas.

The library can be installed and then used by within a Fortran project. It currently offers a set of neural network layers:

  • 1D, 3D, and 4D inputer layers
  • 2D and 3D convolutional layers
  • 2D and 3D dropblock layers
  • Dropout layer
  • 2D and 3D flatten layers
  • 2D and 3D maxpool layers
  • Fully-connected (dense) layers

I hope that this is useful for someone as well as myself. Feel free to do whatever you want with it. I hope to continue to maintain this and develop it further, but will likely need to learn more Fortran to improve its speed, as that may be a limiting factor so far.

My next plan is to learn how the Fortran Package Manager works and try to make it compilable/accessible using that.

Feel free to ask any questions or make recommendations.

31 Likes

@nedanator awesome, great job! Thanks for sharing this here. Fortran needs more packages like yours for machine learning.

1 Like

Thanks, @certik. Happy to share. Hopefully this will be useful to someone. :slight_smile:

1 Like