Package org.encog.engine

Examples of org.encog.engine.EncogEngineError


  public FlatNetworkLearning(NeuralNetwork network) {
    FlatNetworkPlugin plugin = (FlatNetworkPlugin) network
        .getPlugin(FlatNetworkPlugin.class);
    FlatNetwork flat = plugin.getFlatNetwork();
    if (this.flat == null)
      throw new EncogEngineError(
          "This learning rule only works with a network that has a FlatNetworkPlugin attached.");
    init(flat);
  }
View Full Code Here


   * This method is not used.
   * @param patternError Not used.
   */
  @Override
  protected void updateNetworkWeights(double[] patternError) {
    throw new EncogEngineError(
        "Method (updateNetworkWeights) is unimplemented and should not have been called.");

  }
View Full Code Here

   * This method is not used.
   * @param patternError Not used.
   */
  @Override
  protected void updateTotalNetworkError(double[] patternError) {
    throw new EncogEngineError(
        "Method (updateTotalNetworkError) is unimplemented and should not have been called.");

  }
View Full Code Here

      Layer layer = network.getLayers().get(layerIndex);

      for (Neuron neuron : layer.getNeurons()) {
        for (Connection connection : neuron.getInputConnections()) {
          if (index >= weights.length)
            throw new EncogEngineError("Weight size mismatch.");

          Weight weight = connection.getWeight();
          FlatWeight flatWeight = new FlatWeight(weights, index++);
          flatWeight.setValue(weight.getValue());
          connection.setWeight(flatWeight);
View Full Code Here

  /**
   * Called internally to prepare to execute a kernel.
   */
  public void prepareKernel() {
    if (this.kernel == null) {
      throw new EncogEngineError(
          "Must compile CL kernel before using it.");
    }
  }
View Full Code Here

   *            The data to be decoded.
   */
  @Override
  public void decodeNetwork(final double[] data) {
    if (data.length != this.weights.length) {
      throw new EncogEngineError(
          "Incompatable weight sizes, can't assign length="
              + data.length + " to length=" + data.length);
    }
    this.weights = data;

View Full Code Here

   * @param d
   *            The input array to the activation function.
   * @return The derivative.
   */
  public double derivativeFunction(final double d) {
    throw new EncogEngineError(
        "Can't use the competitive activation function "
            + "where a derivative is required.");

  }
View Full Code Here

    final ClassLoader loader = ResourceLoader.class.getClassLoader();
    final InputStream is = loader.getResourceAsStream(resource);

    if (is == null) {
      final String str = "Can't read resource: " + resource;
      throw new EncogEngineError(str);
    }
    return is;
  }
View Full Code Here

        result.append(line);
        result.append("\r\n");
      }
      return result.toString();
    } catch (final IOException e) {
      throw new EncogEngineError(e);
    } finally {
      try {
        if (is != null) {
          is.close();
        }
      } catch (final IOException e) {
        throw new EncogEngineError(e);
      }
    }
  }
View Full Code Here

   */
  public TrainFlatNetworkProp(final FlatNetwork network,
      final EngineDataSet training) {

    if (!(training instanceof EngineIndexableSet)) {
      throw new EncogEngineError(
          "Training data must be Indexable for this training type.");
    }

    this.training = training;
    this.network = network;
View Full Code Here

TOP

Related Classes of org.encog.engine.EncogEngineError

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.