SHARE
TWEET

Untitled

a guest Dec 8th, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.             int zeros = 0;
  2.             int end = (layer + 1) * layerSize;
  3.             int from = layer * layerSize;
  4.             int[] thisLayer = Arrays.copyOfRange(data, from, end);
  5.             for (int i = 0; i < thisLayer.length; i++) {
  6.                 if (thisLayer[i] != 2) {
  7.                     image[i] = thisLayer[i];
  8.                 }
  9.                 if (thisLayer[i] == 0) {
  10.                     zeros++;
  11.                 }
  12.             }
  13.             if (zeros < leastZeros) {
  14.                 countLayer = thisLayer;
  15.                 leastZeros = zeros;
  16.  
  17.             }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top