public static Instrumentation MaxPoolingInstrumentation(int[] choices) { Instrumentation ret = new Instrumentation(); ret.LayerType = LayerType.POOLING_LAYER; ret.DisjunctionConstraints = null; ret.Selections = choices; return(ret); }
public static Instrumentation ReLUInstrumentation(DisjunctionChoice[] choices) { Instrumentation ret = new Instrumentation(); ret.LayerType = LayerType.RECTIFIED_LINEAR; ret.DisjunctionConstraints = choices; ret.Selections = null; return(ret); }
public static void InitializeNNAnalysis() { Control.UseNativeMKL(); String relulog = Utils.RobustnessOptions.ReLULogFile; if (relulog != "") { Instrumentation.InitReLULogging(); } }
public override Vector <double> EvaluateConcrete(Vector <double> v) { var res = v.Map(x => Active(x)? x : 0.0); if (Utils.RobustnessOptions.ReLULogFile != "") { var disjunctionChoices = CreateDisjunctionChoices(v); Instrumentation.LogDisjunctionChoices(Utils.RobustnessOptions.ReLULogFile, Index, disjunctionChoices); } return(res); }
public override void Instrument(NNInstrumentation instr, Vector <double> input, Vector <double> output) { instr[Index] = Instrumentation.NoInstrumentation(); }
public override void Instrument(NNInstrumentation instr, Vector <double> input, Vector <double> output) { var disjunctionChoices = CreateDisjunctionChoices(input); instr[Index] = Instrumentation.ReLUInstrumentation(disjunctionChoices); }
public override void Instrument(NNInstrumentation instrumentation, Vector <double> input, Vector <double> output) { instrumentation[Index] = Instrumentation.MaxPoolingInstrumentation(new int[OutputDimension]); base.ApplyKernels <NumInstDouble, double, Vector <double>, NNInstrumentation>(instrumentation, ApplyKernelConcrete, input); }
public bool Equals(DisjunctionChoice[] a, DisjunctionChoice[] b) { return(Instrumentation.EqualDisjunctionChoices(a, b)); }
public static Instrumentation NoInstrumentation() { Instrumentation ret = new Instrumentation(); return(ret); }