# ATHENA, Fortran neural network library - 3D convolutional layers

**URL:** <https://fortran-lang.discourse.group/t/athena-fortran-neural-network-library-3d-convolutional-layers/6690>\
**Category:** Announcements\
**Created:** [October 25, 2023, 1:47pm UTC](https://fortran-lang.discourse.group/t/athena-fortran-neural-network-library-3d-convolutional-layers/6690 "2023-10-25T13:47:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nedanator](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/nedanator/32/4416_2.png) [@nedanator](https://fortran-lang.discourse.group/u/nedanator)\
**Post date:** [October 25, 2023, 1:47pm UTC](https://fortran-lang.discourse.group/t/athena-fortran-neural-network-library-3d-convolutional-layers/6690/1 "2023-10-25T13:47:05Z")

</div>

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.

> **[Hepplestone / athena · GitLab](https://git.exeter.ac.uk/hepplestone/athena)**
>
> Convolutional neural network in Fortran, focused on 3D convolution

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](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.

---

<div class="post-metadata">

**Author:** ![certik](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/certik/32/4_2.png) [@certik](https://fortran-lang.discourse.group/u/certik)\
**Post date:** [October 26, 2023, 3:53am UTC](https://fortran-lang.discourse.group/t/athena-fortran-neural-network-library-3d-convolutional-layers/6690/2 "2023-10-26T03:53:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nedanator](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/nedanator/32/4416_2.png) [@nedanator](https://fortran-lang.discourse.group/u/nedanator)\
**Post date:** [October 26, 2023, 6:25am UTC](https://fortran-lang.discourse.group/t/athena-fortran-neural-network-library-3d-convolutional-layers/6690/3 "2023-10-26T06:25:12Z")

</div>

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