Support for tensorflow and fortran 90? #34
Unanswered
xushanthu-2014
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Yes, it should be possible to do this with forpy. I think writing a python module to create a simple interface to tensorflow that is suited to your problem is a good approach. While you could import tensorflow and setup all the tensorflow stuff in Fortran in forpy, this would need a lot of boilerplate code. I have not used tensorflow with forpy myself, but other people have: It should also not be a problem to use the subroutine |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently I am running an atmospheric model which was written by Fortran 90. In some subroutines I made some innovations using python (mainly tensorflow). Now I need to implement this python code into Fortran, so is there any wrapper to do this? just calling python within a Fortran subroutine?
I knew that your
forpy
could do this. But I am suspecting could it help me to import tensorflow into Fortran?Here is the pseudo code of my basic thoughts:
And in the python script "python_wrapper.py", I need to do:
And with
forpy
, can we simply the process and do the following in thedemo.f90
?Or just in the
demo.f90
, canforpy
do the wrapper things?One more thing, the subroutine
demo
or.demo_sim
needs to be called in other subroutine (for example,outer.f90
) of the atmospheric model. So how can I use this subroutine? I see that in your readme file I need to write something likeSo do I still need to write the above commands in the
outer.f90
?Thanks a lot!
Beta Was this translation helpful? Give feedback.
All reactions