public static double cnntest(cnn_net net,double[][][] x,double[][]y){


        net = cnnff(net,x);
        int n = x.length;


        int[] label=new int[n];
        int[] answer = new int[n];
        int bad = 0;

        for(int i =0;i<n;i++){
            double[] tmp = new double[y[0].length];
            for(int k=0;k<tmp.length;k++){
                tmp[k] = net.o[k][i];
            }
            label[i]=util.indexOfMax(tmp);
            answer[i]=util.indexOfMax(y[i]);
            if(label[i]!=answer[i]){
                bad++;
            }
        }
        System.out.println("錯誤數量:"+bad+" 總共:"+n);
        util.printMatrix(net.o);
        return (double)bad/(double)n;
    }