feed-forward neural network for python

mwojc wojciechowski_m at o2.pl
Mon Dec 11 17:12:33 EST 2006


Beliavsky napisal(a):
> mwojc wrote:
> > Hi!
> > I released feed-forward neural network for python (ffnet) project at
> > sourceforge. Implementation is extremelly fast (code written mostly in
> > fortran with thin python interface, scipy optimizers involved) and very
> > easy to use.
> > I'm announcing it here because you, folks, are potential users/testers.
> >
> > If anyone is interested please visit http://ffnet.sourceforge.net (and
> > then post comments if any...)
>
> Thanks for making available your code. The Fortran code compiles with
> both g95 and gfortran. I looked at the code briefly, and it is
> well-documented and clear, but I do wonder why you are writing new code
> in Fortran 77. Using free source form instead of fixed source form
> would make the code more readable, and using the array operations of
> Fortran 90 would make it more concise. Gfortran is a Fortran 95
> compiler and is part of gcc, so using Fortran 95 features should not
> inhibit portability.

There are three reasons I use Fortran 77:
1. g77 compiler is just everywhere.
2. fortran 77 code compiles with all subsequent fortrans.
3. f2py not necessarily support fortran 90/95 instructions.
Portability of Fortran 95 is not so obvious, for example my 2-years old
Gentoo Linux has only g77
and I think there are many people like me.

> I think using the single letter "o" as a variable name is a bad idea --
> it looks too much like "0".

You're right, thanks.

> I would like to see a Fortran driver (main program) for the code, so I
> could see an example of its use independent from Python and f2py.

Yes, this would be nice. The only problem is that all data arrays
defining the network
are set up in python. The simple case however (like XOR) can be
inserted manually
(or read from file) and I'll try to include this in the next release.

In fact, in my work, I plan to train the networks in python but use
them also from fortran.

Thanks

Marek




More information about the Python-list mailing list