docs/assistant/ModelLoader_en.md
After the training process is completed, the model needs to be put into production envirionment. To offer a better interface by which other systems can utilize the models trained by Angel conveniently, Angel provides a
ModelLoaderclass as a model loading tool.ModelLoaderprovides a set of static methods that read and store model files in memory in basic data structures (Array and Map).
loadToDoubleArrays
double[][] loadToDoubleArrays(String modelDir, Configuration conf) throws IOExceptiondouble type model into a 2-D double array; each row of the model corresponds to a 1-D arrayString modelDir: model save path; Configuration conf: HDFS-related configurationdouble array representing a dense double type modelloadToDoubleMaps
Int2DoubleOpenHashMap[] loadToDoubleMaps(String modelDir, Configuration conf) throws IOExceptiondouble type model into an array of <int, double> hashmap; each row in the model corresponds to a mapString modelDir: model save path; Configuration conf: HDFS-related configuration<int, double> map representing a sparse double type modelloadToDoubleLongKeyMaps
Long2DoubleOpenHashMap[] loadToDoubleLongKeyMaps(String modelDir, Configuration conf) throws IOExceptiondouble type model (with keys in long type) into an array of <long, double> hashmap; each row in the model corresponds to a mapString modelDir: model save path; Configuration conf: HDFS-related configuration<long, double> map representing a sparse double type modelloadToFloatArrays
float[][] loadToFloatArrays(String modelDir, Configuration conf) throws IOExceptionfloat type model into a 2-D float array; each row in the model corresponds to a 1-D arrayString modelDir: model save path; Configuration conf: HDFS-related configurationfloat array representing a dense float type modelloadToFloatMaps
Int2FloatOpenHashMap[] loadToFloatMaps(String modelDir, Configuration conf) throws IOExceptionfloat type model into an array of <int, float> hashmap; each row in the model corresponds to a mapString modelDir: model save path; Configuration conf: HDFS-related configuration<int, float> map representing a sparse float type modelloadToIntArrays
int[][] loadToIntArrays(String modelDir, Configuration conf) throws IOExceptionint type model into a 2-D int array; each row in the model corresponds to a 1-D arrayString modelDir: model save path; Configuration conf: HDFS-related configurationint array representing a dense float type modelloadToIntMaps
Int2IntOpenHashMap[] loadToIntMaps(String modelDir, Configuration conf) throws IOExceptionint type model into an array of <int, int> hashmap; each row in the model corresponds to a mapString modelDir: model save path; Configuration conf: HDFS-related configuration<int, int> map representing a sparse int type model