Hello everyone,
I am having a problem testing the Benchmark program. I have modified the file Benchmark.java to run the process of creating and training a neural network two times. The first time it takes around 960ms (warmup and actual) while the second time it takes around 4.2ms. I also can observe in the system monitor (Oracle Linux) how it uses all the cores in the first running while it only uses one in the second call to the function (4.5ms). I have attached a file where you can see the simple modification to the Benchmark.java file.
Thank you advance
| Attachment | Size |
|---|---|
| 2.8 KB |
Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer
Hello again,
Hello again,
I have just realized that by commenting the line "Encog.getInstance().shutdown();" all the cores work around 75% the second time I called the method "test". Initially I thought that this problem was related to another application that I am working. What I have been able to find so far is that if the numbers of rows in the input array (to be train) is around 100 positions only one core will work and also if I use the HybridStrategy I get the impression that only one core is working at 100%, the rest are barely showing activity. Well perhaps it is my impression, I am not really an expert in multi-thread.
I tried your attached source
I tried your attached source code. Once I remove the shutdown call, I get pretty consistent results between the two runs.
The main thing that shutdown does is to shutdown the threading pool that Encog uses. Really Encog is not designed to be used after shutdown is called, but it does seem to continue to be usable, just without a thread pool.