Package org.encog.neural.freeform

Examples of org.encog.neural.freeform.FreeformNetwork


  public final File EG_FILENAME = TEMP_DIR.createFile("encogtest.eg");
  public final File SERIAL_FILENAME = TEMP_DIR.createFile("encogtest.ser");

  public FreeformNetwork create()
  {
    FreeformNetwork network = XOR.createTrainedFreeformXOR();
    XOR.verifyXOR(network, 0.1);
   
    network.setProperty("test", "test2");

    return network;
  }
View Full Code Here


  }
 
  @Test
  public void testPersistSerial() throws IOException, ClassNotFoundException
  {
    FreeformNetwork network = create();
   
    SerializeObject.save(SERIAL_FILENAME, network);
    FreeformNetwork network2 = (FreeformNetwork)SerializeObject.load(SERIAL_FILENAME);
       
    validate(network2);
  }
View Full Code Here

      return result;
    }

    public static FreeformNetwork createTrainedFreeformXOR() {
      BasicNetwork network = createTrainedXOR();
      return new FreeformNetwork(network);
    }
View Full Code Here

    Assert.assertTrue("Improve rate too low for " + train.getClass().getSimpleName() +
        ",Improve="+improve+",Needed="+requiredImprove, improve>=requiredImprove);
  }

  public static FreeformNetwork createXORFreeformNetworkUntrained() {
    FreeformNetwork network = new FreeformNetwork();
    FreeformLayer inputLayer = network.createInputLayer(2);
    FreeformLayer hiddenLayer1 = network.createLayer(3);
    FreeformLayer outputLayer = network.createOutputLayer(1);
   
    network.connectLayers(inputLayer, hiddenLayer1, new ActivationSigmoid(), 1.0, false);
    network.connectLayers(hiddenLayer1, outputLayer, new ActivationSigmoid(), 1.0, false);
   
    network.reset(1000);
    return network;
  }
View Full Code Here

TOP

Related Classes of org.encog.neural.freeform.FreeformNetwork

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.