Skip to content
Snippets Groups Projects
Commit bdeeba51 authored by Jonas Bünning's avatar Jonas Bünning
Browse files

update readme

parent 01353a18
No related branches found
No related tags found
No related merge requests found
# C++ part
## Description
In this part the network is read from json, pruned, and then written back. The paths need to be adjusted for that in main.cpp.
## Setup
The dependencies for the interval_network library are boost, Eigen3, nlohmann_json and NAG::dco_cpp. To install the first three ones (sudo previledges required):
sudo apt-get install build-essential libboost-all-dev libeigen3-dev nlohmann-json3-dev
To set up the interval_network library, create a folder *extern* and clone the repository into it
mkdir extern && cd extern && git clone https://git.rwth-aachen.de/sisc_lab_2022/interval_network.git
The dco library should also go into the extern folder. dco will be found if it is in the extern folder and is called dco (without the version number). Alternatively, dco can also be installed properly on the computer. In this case it will be located outomatically
\ No newline at end of file
...@@ -31,7 +31,7 @@ int main(int, char**) ...@@ -31,7 +31,7 @@ int main(int, char**)
using dco_ttype = dco_mode::tape_t; using dco_ttype = dco_mode::tape_t;
// original network // original network
std::string networkPath = "/home/jonas/siscLab/example/python/simple_network.json"; std::string networkPath = "/path/to/simple_network.json";
std::cout << "read json file" << std::endl; std::cout << "read json file" << std::endl;
std::ifstream f(networkPath); std::ifstream f(networkPath);
...@@ -103,7 +103,7 @@ int main(int, char**) ...@@ -103,7 +103,7 @@ int main(int, char**)
// save network // save network
auto js = network.to_json(); auto js = network.to_json();
std::ofstream o("/home/jonas/siscLab/example/python/pruned_network.json"); std::ofstream o("/path/to/pruned_network.json");
o << std::setw(2) << js << std::endl; o << std::setw(2) << js << std::endl;
o.close(); o.close();
} }
# Python part
## Description
the file train_simple_network.py is meant to serve as an example for training a network and the converting it to a json file which can then be further processed from the c++ side. The file network_evaluation.py can be used to check the accuracy of the pruned network
## Setup
To install the required libraries for cpu-only (maybe after creating a virtual environment):
pip install numpy tensorflow-cpu
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment