Examples of ArchitectureLayer


Examples of org.encog.ml.factory.parse.ArchitectureLayer

      throw new EncogError(
          "RBF Networks must have exactly three elements, "
          + "separated by ->.");
    }

    final ArchitectureLayer inputLayer = ArchitectureParse.parseLayer(
        layers.get(0), input);
    final ArchitectureLayer rbfLayer = ArchitectureParse.parseLayer(
        layers.get(1), -1);
    final ArchitectureLayer outputLayer = ArchitectureParse.parseLayer(
        layers.get(2), output);

    final int inputCount = inputLayer.getCount();
    final int outputCount = outputLayer.getCount();

    RBFEnum t;

    if (rbfLayer.getName().equalsIgnoreCase("Gaussian")) {
      t = RBFEnum.Gaussian;
View Full Code Here

Examples of org.encog.ml.factory.parse.ArchitectureLayer

        defaultCount = input;
      } else {
        defaultCount = output;
      }

      final ArchitectureLayer layer = ArchitectureParse.parseLayer(
          layerStr, defaultCount);
      final boolean bias = layer.isBias();

      String part = layer.getName();
      if (part != null) {
        part = part.trim();
      } else {
        part = "";
      }
     
      ActivationFunction lookup = this.factory.create(part);
     
      if (lookup!=null) {
        af = lookup;
      } else {
        if (layer.isUsedDefault()) {
          questionPhase++;
          if (questionPhase > 2) {
            throw new EncogError("Only two ?'s may be used.");
          }
        }

        if (layer.getCount() == 0) {
          throw new EncogError("Layer can't have zero neurons, Unknown architecture element: "
              + architecture + ", can't parse: " + part);
        }

        result.addLayer(new BasicLayer(af, bias,
            layer.getCount()));

      }
    }

    result.getStructure().finalizeStructure();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.