Here you can find the source of maxpool(float[] curr, float[] probs)
public static float[] maxpool(float[] curr, float[] probs)
//package com.java2s; //License from project: Open Source License public class Main { /**// w ww .jav a2 s . c o m * Takes the maximum value at each position */ public static float[] maxpool(float[] curr, float[] probs) { if (curr.length != probs.length) { throw new IllegalArgumentException("Float[] need to have the same size"); } float[] _ret = new float[curr.length]; for (int i = 0; i < curr.length; i++) { if (curr[i] > probs[i]) { _ret[i] = curr[i]; } else { _ret[i] = probs[i]; } } return _ret; } }