How to use a neural network (Pytorch- or Tensorflow-based) in Fortran?
Python is popular and optimal for neural network development and training. However, many scientific codes are written in the Fortran language. How I can call a trained network in my Fortran program?

It would not make sense. You are not training the network in Fortran, you are just trying to run the C++ or Python code from Fortran.
You should abstract the training/inference from your Fortran code. You could do the orchestration in Fortran.

Create your model in Python
Expose your model thru an API that you can access from Fortran via an httpRequest.

By doing that, you could expose anything you want to your Fortran app.
