Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Neural Networks add-on

  • To: mathgroup at smc.vnet.net
  • Subject: [mg73697] Re: Neural Networks add-on
  • From: Zdenek Buk <zdenek at buk.cz>
  • Date: Sat, 24 Feb 2007 02:32:19 -0500 (EST)
  • Organization: Czech Technical University
  • References: <eqmc9p$b9l$1@smc.vnet.net>

Hi,
Neural Networks are represented as normal Mathematica expression, for 
example:

net = InitializeFeedForwardNet[x, y, {3}, RandomInitialization -> True];
{net2, fitrecord} = NeuralFit[net, x, y, 10];

Now in "net2" we have trained feedforward neural network.
See how it is represented:

net2 // FullForm

We get:

FeedForwardNet[
   List[List[
       List[List[-0.016829909833804252`,
           0.0722716242618731`, -0.12204314473108982`],
         List[-0.5019370853681208`,
           0.7511579961593045`, -0.6175665183821598`]],
       List[List[105947.60432053125`], List[63835.228601799456`],
         List[21004.56828760668`], List[-90681.81155516293`]]]],
   List[Rule[AccumulatedIterations, 10],
     Rule[CreationDate, List[2007, 2, 23, 12, 4, 
50.468929`8.455599064200403]],
      Rule[Neuron, Sigmoid], Rule[FixedParameters, None],
     Rule[OutputNonlinearity, None], Rule[NumberOfInputs, 1]]]

Here you can see, that all parameters of network are encoded in this 
expression. So it can be saved using standard export command:

Export["/tmp/net.m", net2]

Trained network (net2) is now saved in file "/tmp/net.m".
We can load it back into Mathematica:

net3 = Import["/tmp/net.m"]

"net3" now represents the same network as "net2".


I hope that it helped it you a bit.

Zdenek Buk


Timothy Chan wrote:
> I was wondering if anyone has expertise in the Mathematica Neural 
> Network add-on.
> I would like to know how to save a NN after it has been trained. I 
> glanced through the documentation and it makes no mention of saving and 
> restoring NN's.
> 
> 
> 


  • Prev by Date: Re: Fuction definition
  • Next by Date: Re: Question: Plots via command-line using front-end fonts?
  • Previous by thread: Neural Networks add-on
  • Next by thread: Eigensystem