Package org.encog.script

Examples of org.encog.script.EncogScriptError


  public static void jsFunction_define(Context cx, Scriptable thisObject, Object[] args, Function funObj)
  {
    JSTrainingData training = (JSTrainingData)thisObject;
    if( args.length!=(training.inputCount+training.idealCount) )
    {
      throw new EncogScriptError("Wrong number of parameters to define, must be " + (training.inputCount+training.idealCount) + ", because we have " + training.inputCount + " input and " + training.idealCount + " ideal.");
    }
   
    int index = 0;
   
    double[] inputData = new double[training.inputCount];
View Full Code Here


    else if( activation.equalsIgnoreCase("tanh") )
      pattern.setActivationFunction(new ActivationSigmoid());
    else if( activation.equalsIgnoreCase("linear") )
      pattern.setActivationFunction(new ActivationSigmoid());
    else
      throw new EncogScriptError("Uknown activation type: " + activation);
   
    this.network = pattern.generate();
  }
View Full Code Here

        } catch(EvaluatorException e) {
          throw new EncogScriptRuntimeError(e);
        } catch(EcmaError e) {
          throw new EncogScriptRuntimeError(e);
        } catch (IllegalAccessException e) {
      throw new EncogScriptError(e);
    } catch (InstantiationException e) {
      throw new EncogScriptError(e);
    } catch (InvocationTargetException e) {
      throw new EncogScriptError(e);
    }
        finally {
          Context.exit();
        }
  }
View Full Code Here

TOP

Related Classes of org.encog.script.EncogScriptError

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.