def predict(self, X, truth):
        ix = [(self.bins[i].searchsorted(X[:, i]) - 1) for i in xrange(len(self.bins))]
        ix = np.array(ix).T
        print ix
        weights = []
        for i, label in zip(ix, truth):
            if label == 1:
                w = np.copy(self.flat_cube_s[i[0]])
            else:
                w = np.copy(self.flat_cube_b[i[0]])
            for j in xrange(1, len(self.bins)):
                w = w[i[j]]
            weights.append(w)
        weights = np.array(weights)
        weights[np.isinf(weights)] = weights[np.isfinite(weights)].max()
        return weights

# X_train_image = np.load()
dataset/ETHPy150Open ml-slac/deep-jets/training/maxout-train-hypercube.py/NDWeights.predict/original