________ _____ ______ _____
|_ __ ||_ _| .' ____ \ |_ _|
| |_ \_| | | | (___ \_| | |
| _| _ | | _ _.____`. | |
_| |__/ | _| |__/ || \____) | _| |_
|________||________| \______.'|_____|
(Due to the limitation of Google Drive storage space, only OSM1 and Skewed are shared. If you need Uniform and OSM2, please email me.)
homepage: https://pytorch.org/get-started/locally/
CPU version: https://download.pytorch.org/libtorch/cpu/libtorch-macos-1.4.0.zip
For GPU version, choose according to your setup.
homepage: https://www.boost.org/
Choose CPU or GPU
# TYPE = CPU
TYPE = GPU
Change *home/liuguanli/Documents/libtorch_gpu* to your own path.
ifeq ($(TYPE), GPU)
INCLUDE = -I/home/liuguanli/Documents/libtorch_gpu/include -I/home/liuguanli/Documents/libtorch_gpu/include/torch/csrc/api/include
LIB +=-L/home/liuguanli/Documents/libtorch_gpu/lib -ltorch -lc10 -lpthread
FLAG = -Wl,-rpath=/home/liuguanli/Documents/libtorch_gpu/lib
else
INCLUDE = -I/home/liuguanli/Documents/libtorch/include -I/home/liuguanli/Documents/libtorch/include/torch/csrc/api/include
LIB +=-L/home/liuguanli/Documents/libtorch/lib -ltorch -lc10 -lpthread
FLAG = -Wl,-rpath=/home/liuguanli/Documents/libtorch/lib
endif
comment #define use_gpu to use CPU version
#ifndef use_gpu
#define use_gpu
.
.
.
// Example.cpp
#endif // use_gpu
Change /home/research/datasets/ to the position for data sets.
Change /home/liuguanli/Dropbox/research/BASE/ to your own path for ELSI.
Change /home/liuguanli/Documents/pre_train/ to the position where your store the pre-trained models.
Change the path if you do not want to store the datasets under the project's root path.
Constants.h
const string Constants::RECORDS = "./files/records/";
const string Constants::PRE_TRAIN_1D_DATA = "/home/liuguanli/Documents/pre_train/1D_data/0.1/";
const string Constants::RL_FILE = "/home/liuguanli/Dropbox/research/BASE/method_pool/RL/rl_4_sfc/RL_4_SFC.py";
Config method pool
init method poll
vector<int> methods{Constants::CL, Constants::MR, Constants::OG, Constants::RL, Constants::RS, Constants::SP};
config::init_method_pool(methods);
ELSI<Point, long long> framework;
framework.config_method_pool();
init framework poll
ELSI<Point, long long> framework;
framework.config_method_pool();
// cf. ELSI.h
framework.dimension = 1;
framework.point_query_p = point_query;
framework.window_query_p = window_query;
framework.knn_query_p = kNN_query;
framework.build_index_p = build_index;
framework.init_storage_p = init_underlying_data_storage;
framework.insert_p = insert;
framework.remove_p = remove;
framework.generate_points_p = generate_points;
// cf. DataSet.h
DataSet<Point, long long>::read_data_pointer = read_data;
DataSet<Point, long long>::mapping_pointer = mapping;
DataSet<Point, long long>::save_data_pointer = save_data;