示例#1
0
        public override void Validate(MyValidator validator)
        {
            base.Validate(validator);

            if (!ParamsChanged)
            {
                validator.AssertError(Layers.Count > 0, this, "The network has no layers.");

                validator.AssertError(DataInput != null, this, "No input available.");
                if (DataInput != null)
                {
                    validator.AssertError(DataInput.Count > 0, this, "Input connected but empty.");
                    validator.AssertWarning(DataInput.ColumnHint > 1, this, "The Data input columnHint is 1.");
                    uint total = InputWidth * InputHeight * InputsCount * ForwardSamplesPerStep;
                    validator.AssertError(DataInput.Count == total, this, "DataInput Count is " + DataInput.Count + ". Expected " + InputLayer.Output.ToString() + " = " + total + ".");
                }

                validator.AssertError(TrainingData != null, this, "No TrainingData available.");
                if (TrainingData != null)
                {
                    validator.AssertError(TrainingData.Count > 0, this, "TrainingData connected but empty.");
                    validator.AssertWarning(TrainingData.ColumnHint > 1, this, "TrainingData columnHint is 1.");
                    uint total = InputWidth * InputHeight * InputsCount * TrainingSamplesPerStep;
                    validator.AssertError(TrainingData.Count == total, this, "TrainingData Count is " + TrainingData.Count + ". Expected " + InputLayer.Output.ToString() + " = " + total + ".");
                }

                validator.AssertError(TrainingLabel != null, this, "No TrainingLabel available.");
                validator.AssertError(LastLayer != null, this, "Last layer is null.");
                if (TrainingLabel != null && LastLayer != null)
                {
                    validator.AssertError(TrainingLabel.Count == LastLayer.Output.Count * TrainingSamplesPerStep, this, "Current label dimension is " + TrainingLabel.Count + ". Expected " + TrainingSamplesPerStep + "x" + LastLayer.Output.Count + ".");
                }
            }
        }
示例#2
0
 public override void Validate(MyValidator validator)
 {
     validator.AssertError(!(BoxPlot.Enabled && WindowLength != 1 && CalculateFor != CalculateForEnum.AllElements), this,
                           "BoxPlot with WindowLength other than 1 can be used with CalculateFor = 'AllElements' option only");
     validator.AssertError(!(BoxPlot.Enabled && CalculateFor == CalculateForEnum.WholeMatrix && Input.Count < 5), this,
                           "BoxPlot recieves too small input to get reasonable output");
 }
示例#3
0
 public override void Validate(MyValidator validator)
 {
     base.Validate(validator);
     validator.AssertError(DelayMemorySize > 0, this, "DelayMemorySize must be a positive integer.");
     validator.AssertError(ApproachValue.Factor <= 1 && ApproachValue.Factor > 0, this, "Factor must be greater then 0 and less or equal to 1.");
     validator.AssertError(ApproachValue.Delta >= 0, this, "Delta must be a positive integer or zero");
 }
        public override void Validate(MyValidator validator)
        {
            //base.Validate(validator);
            validator.AssertError(Controls != null, this, "No input available");

            if (Limits != null)
            {
                validator.AssertError(Limits.Count == 3, this, "Limit vector must be of a size 3 or nothing!");
            }

            if (Reset != null)
            {
                validator.AssertError(Reset.Count == 1, this, "Reset vector must be of a size 1 or nothing!");
            }

            if (Controls != null)
            {
                if (ELBOW_FIXED)
                {
                    validator.AssertError(Controls.Count >= 1, this, "Not enough controls (1 required)");
                }
                else
                {
                    validator.AssertError(Controls.Count >= 2, this, "Not enough controls (2 required)");
                }
            }
        }
示例#5
0
 public override void Validate(MyValidator validator)
 {
     //base.Validate(validator); /// base checking
     validator.AssertError(Patches != null, this, "No input available");
     validator.AssertError(Desc != null, this, "No input available");
     validator.AssertError(Mask != null, this, "No input available");
 }
示例#6
0
 public override void Validate(MyValidator validator)
 {
     base.Validate(validator);
     validator.AssertError(Input != null, this, "Input connection missing!");
     validator.AssertError(LENGTH > 0, this, "The length of encoded output have to be larger than 0!");
     validator.AssertError(ON_BITS_LENGTH < LENGTH, this, "The value ON_BITS_LENGTH should be smaller than LENGTH (around 2% of the LENGTH value is recomended)!");
 }
示例#7
0
 public override void Validate(MyValidator validator)
 {
     //base.Validate(validator);
     validator.AssertError(Neurons > 0, this, "Number of neurons should be > 0");
     validator.AssertError(Input != null, this, "Neural network node \"" + this.Name + "\" has no input.");
     validator.AssertWarning(Connection != ConnectionType.NOT_SET, this, "ConnectionType not set for " + this);
 }
示例#8
0
        public override void Validate(MyValidator validator)
        {
            base.Validate(validator);
            validator.AssertError(Input.Count != 0, this, "Zero input size is not allowed.");

            base.Validate(validator);
            validator.AssertError(Reward.Count != 0, this, "Zero reward size is not allowed.");
        }
示例#9
0
        //Validation rules
        public override void Validate(MyValidator validator)
        {
            validator.AssertError((InputHeight - FilterHeight + 2 * ZeroPadding) % VerticalStride == 0, this, "Filter doesn't fit vertically when striding.");

            validator.AssertError((InputWidth - FilterWidth + 2 * ZeroPadding) % HorizontalStride == 0, this, "Filter doesn't fit horizontally when striding.");

            validator.AssertInfo(ZeroPadding == (FilterWidth - 1) / 2 && ZeroPadding == (FilterHeight - 1) / 2, this, "Input and output might not have the same dimension. Set stride to 1 and zero padding to ((FilterSize - 1) / 2) to fix this.");
        }
示例#10
0
 public override void Validate(MyValidator validator)
 {
     base.Validate(validator);
     validator.AssertError(Anchors != null && Anchors.ColumnHint == 3, this, "Anchors must be a 3xN matrix");
     validator.AssertError(RotationAxes != null && RotationAxes.ColumnHint == 3, this, "RotationAxes must be a 3xN matrix");
     validator.AssertError(Anchors != null && RotationAxes != null && Anchors.Count == RotationAxes.Count, this, "Number of anchors and rotation axes must be the same");
     validator.AssertError(Point != null && Point.Count == 3, this, "Point must be a 3 dimensional vector");
     validator.AssertError(Force != null && Force.Count == 3, this, "Force must be a 3 dimensional vector");
 }
示例#11
0
 public override void Validate(MyValidator validator)
 {
     base.Validate(validator);
     validator.AssertError(Controls != null, this, "Controls must not be null");
     if (Controls != null)
     {
         validator.AssertError(Controls.Count >= 3, this, "Size of Control input must be 3 or more");
     }
 }
 public override void Validate(MyValidator validator)
 {
     validator.AssertError(ActionInput != null, this, "ActionInput must not be null");
     if (ActionInput != null)
     {
         validator.AssertError(ActionInput.Count == 6, this, "Size of ActionInput must be 6");
     }
     //base.Validate(validator);
 }
示例#13
0
        public override void Validate(MyValidator validator)
        {
            //base.Validate(validator);
            validator.AssertError(ObjectDesc != null, this, "ObjectDesc not given.");
            validator.AssertError(ObjectXY != null, this, "ObjectXY not given.");
            validator.AssertInfo(WorldEvent != null, this, "WorldEvent input not given. no problem :)");

            /*if (MyMovement != null)
             *  validator.AssertError(MyMovement.Count >= 2, this, "Postion of myself has to be at least XY!");*/
        }
示例#14
0
 public override void Validate(MyValidator validator)
 {
     validator.AssertError(RandomPeriodMin > 0, this, "RandomPeriodMin have to be greater than 0.");
     validator.AssertError(RandomPeriodMax > RandomPeriodMin, this, "RandomPeriodMax have to be greater than RandomPeriodMin");
     if (CombinationRNG.Enabled)
     {
         validator.AssertError(CombinationRNG.Min < CombinationRNG.Max, this, "Min has to be smaller than Max for Combination task.");
         validator.AssertError(Output.Count <= CombinationRNG.Max - CombinationRNG.Min, this, "Output is larger than Combination's task range.");
     }
 }
示例#15
0
        public override void Validate(MyValidator validator)
        {
            base.Validate(validator);
            if (Controls != null)
            {
                validator.AssertError(Controls.Count >= 9, this, "Not enough controls");
            }

            validator.AssertError(Bitmaps.Count != 0, this, "Node cannot be executed. Some resources are missing: " + m_errorMessage);
        }
示例#16
0
        public static void CheckControlSize(MyValidator validator, MyAbstractMemoryBlock controls, MyWorkingNode sender)
        {
            validator.AssertError(controls != null, sender, "Controls are not connected");

            if (controls != null)
            {
                int neededControls   = NrOfControls;
                int providedControls = controls.Count;
                validator.AssertError(providedControls >= neededControls, sender, String.Format("Wrong number of actions. With current control mode ({0}) you have to provide at least {1} controls. Provide the correct number of controls or change the control mode.", Mode, neededControls));
                validator.AssertWarning(providedControls != neededControls, sender, String.Format("With current control mode ({0}) you should provide {1} controls but you provided {2} controls. Make sure that this is what you want and you have correct control mode chosen.", Mode, neededControls, providedControls));
            }
        }
        public override void Validate(MyValidator validator)
        {
            base.Validate(validator);

            if (PupilControl != null)
            {
                validator.AssertError(PupilControl.Count > 2, this, "Not enough control values (at least 3 values needed)");

                validator.AssertError((PupilControl.Count % 3) == 0, this, "Wrong pupil control input size, it has to be [x,y,s] or [x,y,s;x,y,s...]");
                validator.AssertError((float)PupilControl.Count / (float)PupilControl.ColumnHint != 0, this, "If input is matrix, it has to be 3 columns and N rows, each row x,y,s");
            }
        }
示例#18
0
        public override void Validate(MyValidator validator)
        {
            base.Validate(validator);

            if (Input != null)
            {
                int inputWidth  = Input.ColumnHint;
                int inputHeight = Input.Count / inputWidth;

                validator.AssertError(inputWidth + LeftMargin + RightMargin > 0, this, "Left or right margin is too big");
                validator.AssertError(inputHeight + TopMargin + BottomMargin > 0, this, "Top or Bottom margin is too big");
            }
        }
示例#19
0
        public override void Validate(MyValidator validator)
        {
            base.Validate(validator);
            int totalOutputs = 0;

            for (int i = 0; i < OutputBranches; i++)
            {
                totalOutputs += GetOutput(i).Count;
                validator.AssertError(GetOutput(i).Count > 0, this, "Invalid size of '" + GetOutput(i).Name + "'. Check 'Branches' setting.");
            }

            validator.AssertError(totalOutputs == InputSize, this, "Sum of output sizes must be equal to the input size");
        }
示例#20
0
        public override void Validate(MyValidator validator)
        {
            validator.AssertError(MemorySize > 0, this, "Memory can't be empty.");

            if (Values == null || Indices == null)
            {
                validator.AddError(this, "Missing input is suspicious.");
                return;
            }

            validator.AssertError(Values.Count == Indices.Count, this, "The input vector sizes must be the same.");
            validator.AssertError(Values.Count % SymbolSize == 0, this, "The input vector size must be a multiple of SymbolSize.");
        }
示例#21
0
        public override void Validate(MyValidator validator)
        {
            base.Validate(validator);

            if (validator.ValidationSucessfull)
            {
                // all inputs have equal size (so take first and check others)
                for (int i = 1, size = GetInputSize(0); i < InputBranches; i++)
                {
                    validator.AssertError(size == GetInputSize(i), this, "All inputs must be the same size");
                }
                validator.AssertError(InputBranches >= 2, this, "At least one target and one input have to be set");
            }
        }
示例#22
0
 //Validation rules
 public override void Validate(MyValidator validator)
 {
     base.Validate(validator);
     if (QLearning.Enabled)
     {
         validator.AssertError(Action.Count == Neurons, this, "Number of neurons need to correspond with number of actions (action size)");
         validator.AssertError(Reward.Count == 1, this, "Reward needs to be a single floating point number (cannot be an array)");
     }
     else if (QLearningBatch.Enabled)
     {
         validator.AssertError(ParentNetwork.BatchSize >= 3, this, "BatchSize needs to be >= 3");
         validator.AssertError(Reward.Count == (ParentNetwork.BatchSize - 1) / 2, this, "Reward size must be equal to (BatchSize - 1) / 2");
         validator.AssertError(Action.Count == (ParentNetwork.BatchSize - 1) / 2 * Actions, this, "Action size must be equal to (BatchSize - 1) / 2 * Actions");
     }
 }
示例#23
0
 public virtual void Validate(MyValidator validator)
 {
     for (int i = 0; i < InputBranches; i++)
     {
         validator.AssertError(GetAbstractInput(i) != null, this, "No input available");
     }
 }
示例#24
0
 public override void Validate(MyValidator validator)
 {
     if (ActionInput == null)
     {
         validator.AssertError(false, this, "ActionInput must not be null");
         MessageBox.Show("The simulation cannot start because no inputs are provided to ActionInput", "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else if (Curriculum == null || Curriculum.TasksCount == 0)
     {
         validator.AssertError(false, this,
                               "Curriculum must not be empty. Add or enable some learning tasks. Use AI School GUI from menu View->AI School.");
         MessageBox.Show("Curriculum must not be empty. Add or enable at least one learning task.",
                         "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     CheckNrOfActions(validator);
 }
示例#25
0
        public override void Validate(MyValidator validator)
        {
            //MyLog.INFO.WriteLine("In.c = " + Input.Count + " "+ (Input.Count != 9));
            //MyLog.INFO.WriteLine("Out.c = " + Action.Count + " " + (+Action.Count != 9));


            base.Validate(validator);
//            validator.AssertWarning(XInput.Count == 1 && YInput.Count == 1, this, "Both inputs should have size 1. Only first value will be considered.");
            validator.AssertError(EnvironmentData == null || EnvironmentData.Count == 10, this, "EnvironmentData input has to have size 10.");


            var explore_rate      = this.InitialExploration;
            var exploration_decay = this.ExplorationDecay;

            validator.AssertError(!(explore_rate <0.0 || explore_rate> 1.0 || exploration_decay <0.0 || exploration_decay> 1.0), this, "exploration parameters have to be in [0,1]");
        }
示例#26
0
        public override void Validate(MyValidator validator)
        {
            // base.Validate(validator); // base checking
            //System.Console.WriteLine("-I- Seg:: use SLIC: Input image; Output1-xyNpoints; Output-desc; Output3-mask with ids");
            validator.AssertError(InputR_BW != null, this, "At leaast the Red - channel must be connected, then it will be Balck white image!");
            validator.AssertError(nSegs > 0, this, "The numbner of segments (nSegs) has to be >0!");
            validator.AssertError(((int)Math.Sqrt(nSegs)) * ((int)Math.Sqrt(nSegs)) == nSegs, this, "The number of segments has to be a*a=nSegs!!!");
            validator.AssertError(InputDimX == InputDimY, this, "Input image has to be square.");


            //--- check if I can nicely devide image into blocks -> than I can have the exact number of segmetns!!!
            int nClusterSize    = (int)Math.Sqrt((float)iDivUp(InputDimX * InputDimY, nSegs));
            int nClustersPerCol = (int)iDivUp(InputDimX, nClusterSize); // original for arbitrary sizes
            int nClustersPerRow = (int)iDivUp(InputDimY, nClusterSize);

            validator.AssertWarning((nClustersPerCol * nClustersPerCol) == nSegs, this, "Be sure that sqrt(nSegs)/ImageWidth is integer. This can be a reason for later errors!");
        }
示例#27
0
 public override void Validate(MyValidator validator)
 {
     base.Validate(validator);
     if (FirstInput != null && SecondInput != null)
     {
         validator.AssertError(FirstInput.Count == SecondInput.Count, this, "Operand sizes differ!");
     }
 }
        public override void Validate(MyValidator validator)
        {
            //base.Validate(validator);
            validator.AssertError(Controls != null, this, "No input available");

            if (Controls != null)
            {
                if (ELBOW_FIXED)
                {
                    validator.AssertError(Controls.Count >= 1, this, "Not enough controls (1 required)");
                }
                else
                {
                    validator.AssertError(Controls.Count >= 2, this, "Not enough controls (2 required)");
                }
            }
        }
示例#29
0
        public override void Validate(MyValidator validator)
        {
            base.Validate(validator);
            validator.AssertError(OutputSize > 0, this, "Output must be greater than 0.");

            if (Input != null)
            {
                if (!DoDecoding)
                {
                    validator.AssertError(OutputSize == SymbolSize, this, "Symbol size must be equal to output size");
                }
                else
                {
                    validator.AssertError(InputSize == SymbolSize, this, "Symbol size must be equal to input size.");
                }
            }
        }
示例#30
0
        //Validation rules
        public override void Validate(MyValidator validator)
        {
            base.Validate(validator);

            if (PreviousTopologicalLayer != null)
            {
                validator.AssertError(InputWidth * InputHeight * InputDepth == PreviousTopologicalLayer.Neurons, this, "'Input width * input height * depth' must be equal to output size of the previous layer.");
            }

            validator.AssertError((InputWidth - FilterWidth) % HorizontalStride == 0, this, "Filter does not fit the input image horizontally when striding.");

            // horizontal input check:
            validator.AssertError((InputHeight - FilterHeight) % VerticalStride == 0, this, "Filter does not fit the input image vertically when striding.");

            // vertical input check:
            validator.AssertError(InputHeight > FilterHeight && InputWidth > FilterWidth, this, "Filter dimensions must be smaller than input dimensions.");
        }