docs: private static void applyDropout(final Matrix X, final int randThresh, final Random rand, ExecutorService ex)
      {
          if (ex == null)
          {
              for (int i = 0; i < X.rows(); i++)
                  for (int j = 0; j < X.cols(); j++)
                      if (rand.nextInt() < randThresh)
                          X.set(i, j, 0.0);
          }
          else
          {
              final CountDownLatch latch = new CountDownLatch(SystemInfo.LogicalCores);
              for(int id = 0; id < SystemInfo.LogicalCores; id++)
              {
                  final int ID = id;
                  ex.submit(new Runnable()
                  {
  
                      @Override
                      public void run()
                      {
                          for (int i = ID; i < X.rows(); i+=SystemInfo.LogicalCores)
                              for (int j = 0; j < X.cols(); j++)
                                  if (rand.nextInt() < randThresh)
                                      X.set(i, j, 0.0);
                          latch.countDown();
                      }
                  });
              }
  
              try
              {
                  latch.await();
              }
              catch (InterruptedException ex1)
              {
                  Logger.getLogger(SGDNetworkTrainer.class.getName()).log(Level.SEVERE, null, ex1);
              }
          }
      }