modern-fortran / neural-fortran

A parallel framework for deep learning
MIT License
392 stars 82 forks source link

Start-to-finish example #169

Open OsAmaro opened 6 months ago

OsAmaro commented 6 months ago

Hi. I've recently tried to link neural-fortran to a fortran physics code.

I was wondering if it would be possible to add a bit more documentation on how to use this library, and also a start-to-finish examples of how to compile and run neural-fortran stand-alone (e.g. for a simple neural-network) and how to link to an existing code.

I'm aware of the unit-tests and examples currently available; however, for a user just starting to learn fortran it could be challenging to know how to take one of the example programs compile it and run it.

This would allow users to more easily apply neural-fortran in their own projects.

Thank you in advance.

gradureau2022 commented 5 months ago

Hey, if it can help, I solved this a while ago. I asked in the fortran forum and worked out how to do it with M. Milan Curcic. You can find how to do it in the post 17 of the following discussion :

https://fortran-lang.discourse.group/t/using-a-trained-neural-network-model-in-a-fortran-code/5432/17

Yet from my personal experience, this might not work if you try to compile with mpif90.

Anyways, if someone wants to work on such an exemple, you can always look a this discussion.