code: public static NDArrayDoubles readFromProto(NDArrayDoublesProto.NDArrayDoubles proto) {
      int[] neighborSizes = new int[proto.getDimensionSizeCount()];
      for (int i = 0; i < neighborSizes.length; i++) {
        neighborSizes[i] = proto.getDimensionSize(i);
      }
      NDArrayDoubles factor = new NDArrayDoubles(neighborSizes);
      for (int i = 0; i < proto.getValuesCount(); i++) {
        factor.values[i] = proto.getValues(i);
        assert !Double.isNaN(factor.values[i]);
      }
      return factor;
    }
docs: Creates a new in-memory feature factor from a proto serialization,
  
  @param proto the proto object to be turned into an in-memory feature factor
  @return an in-memory feature factor, complete with in-memory concat vectors