for (int i = 0; i < shape.length; i++) {
            shape[i] = tensorShapeProto.getDim(i).getSize();
        }