Ejemplo n.º 1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Id.Length != 0)
            {
                hash ^= Id.GetHashCode();
            }
            if (Algorithm != 0)
            {
                hash ^= Algorithm.GetHashCode();
            }
            if (ErrorTolerance != 0D)
            {
                hash ^= ErrorTolerance.GetHashCode();
            }
            if (File.Length != 0)
            {
                hash ^= File.GetHashCode();
            }
            if (Support != 0D)
            {
                hash ^= Support.GetHashCode();
            }
            if (SampleSize != 0)
            {
                hash ^= SampleSize.GetHashCode();
            }
            if (K != 0)
            {
                hash ^= K.GetHashCode();
            }
            if (UseTopK != false)
            {
                hash ^= UseTopK.GetHashCode();
            }
            if (DBSize != 0)
            {
                hash ^= DBSize.GetHashCode();
            }
            if (ShutdownServer != false)
            {
                hash ^= ShutdownServer.GetHashCode();
            }
            return(hash);
        }
Ejemplo n.º 2
0
 static void StatusAction(string task, string msg, Action act, ErrorTolerance tolerance = ErrorTolerance.Notify)
 {
     Console.Write (msg);
     try {
         act ();
     } catch (Exception e) {
         Console.WriteLine ("FAIL");
         switch (tolerance) {
             case ErrorTolerance.Notify:
                 Console.WriteLine ("[INFO] Task '{0}' failed. Reason:\n\t{1}", task, e.Message);
                 break;
             case ErrorTolerance.Fail:
                 Console.WriteLine ("[SEVERE] '{0}' failed. Reason:\n\t{1}", task, e.Message);
                 throw e;
         }
         return;
     }
     Console.WriteLine ("OK");
 }
Ejemplo n.º 3
0
        /// <inheritdoc />
        public override void ResolveInputs()
        {
            name = Name.AsString();

            inputActivationFunction = Util.GetActivationFunction(InputActivationFunction.AsString("LINEAR"));

            inputHasBias = InputHasBias.AsBoolean(true);

            hiddenLayerConfig = HiddenLayerConfig.As2DArray <object>();

            outputActivationFunction = Util.GetActivationFunction(OutputActivationFunction.AsString("LINEAR"));

            outputHasBias = OutputHasBias.AsBoolean(true);

            inputs = Inputs.As2DArray <double>();

            targets = Targets.As2DArray <double>();

            errorTolerance = ErrorTolerance.AsDouble();

            epochLimit = EpochLimit.AsInt();
        }