locked
How can I turn off run-time outputs to the screen? RRS feed

  • Question

  • Hi 

    My question is how can I turn off output reports?

    I mean the ones reporting the numbers of iterations, etc.

    Thank You

    Friday, April 8, 2016 4:09 PM

Answers

  • You have to set the ShowProgress property of the InferenceEngine to false.

    I usually use this method to create an inference engine when generating algorithms for production code:

            /// <summary>
            /// Creates an inference engine.
            /// </summary>
            /// <param name="modelName">The name of the model which will use the created engine.</param>
            /// <param name="generatedSourceFolder">The folder to drop the generated algorithm to.</param>
            /// <returns>The created engine.</returns>
            private static InferenceEngine CreateInferenceEngine(string modelName, string generatedSourceFolder)
            {
                var engine = new InferenceEngine { ModelName = modelName, ShowProgress = false };
    
                // Set compiler options
                engine.Compiler.UseSerialSchedules = true;
                engine.Compiler.ReturnCopies = true;
                engine.Compiler.FreeMemory = false;
                engine.Compiler.WriteSourceFiles = true;
                engine.Compiler.GeneratedSourceFolder = generatedSourceFolder;
                engine.Compiler.GenerateInMemory = true;
                engine.Compiler.AddComments = false;
    
                return engine;
            }

    -Y-

    Saturday, April 9, 2016 12:10 PM