Code accompanying Divide and Conquer Networks
- Python 3.6.1 + some traditional libraries
- Computer with Linux or OSX
- PyTorch
- For training, an NVIDIA GPU is needed. CPU not supported.
python code/ConvexHull2d/main.py --path [experiment folder] --path_dataset [dataset folder]
python code/ConvexHull2d/main.py --path [experiment folder] --path_dataset [dataset folder] --dynamic
python code/ConvexHull2d/main.py --path [experiment folder] --path_dataset [dataset folder] --dynamic --regularize_split
Check the parse arguments section at the top of the kmeans.py file to change the default arguments.
python code/K-means/main.py --path [experiment folder] --path_dataset [dataset folder] --dataset ["GM"/"CIFAR"]
Compile the knapsack solver for the creation of the dataset.
g++ src/Knapsack/solver.cc -O2 -o src/Knapsack/solver
Train the model. Check the parse arguments section at the top of the knapsack.py file to change the default arguments.
python src/Knapsack/knapsack.py --dataset_path [dataset folder] --solver_path src/Knapsack/solver --logs_path [experiment folder]