Skip to content

Commit

Permalink
Added changes from ProtoNN-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
adityakusupati committed Nov 23, 2017
1 parent fbc316b commit d7ceeb4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions docs/README_BONSAI_OSS.md
Expand Up @@ -104,10 +104,11 @@ For running Training separately followed by prediction
```bash
sh run_BonsaiTrain_usps10.sh

sh run_BonsaiPredict_usps10.sh
The script prints the path of the model-dir

NOTE: You have to change the model_dir param in run_BonsaiPredict_usps10.sh according to the model directory generated by run_BonsaiTrain_usps10.sh - you can find it in <Data-Dir Path>/BonsaiResults/<Model-Dir>
<Data-Dir Path> is generally ./usps10 in this case and <Model-Dir> will have timestamp as its signature(name).
use "ln -s <model-dir> current_model" to set a soft alias(shortcut) if you wish to run on that model or you choose <model-dir> as per your wish so as to use it in BonsaiPredict on usps10

sh run_BonsaiPredict_usps10.sh
```
## Output
Expand Down
4 changes: 2 additions & 2 deletions run_BonsaiPredict_usps10.sh
Expand Up @@ -10,7 +10,7 @@

input_dir="-D ./usps10"
input_format="-f 0"
model_dir="-M ./usps10/BonsaiResults/10_21_41_20_11" # Note: The model_dir has to be changed as Model naming is based on timestamp so required to be changed by the user
model_dir="-M current_model" # Note: The model_dir has to be changed as Model naming is based on timestamp so required to be changed by the user

########################################################
# Data-dependent parameters
Expand All @@ -25,7 +25,7 @@ ntest="-N 2007"
#gdb=" gdb --args"
executable="./BonsaiPredict"
command=$gdb" "$executable" "$input_format" "$ntest" "$input_dir" "$model_dir
echo "Running Bonsai predict with following command: "
echo "Running Bonsai with following command: "
echo $command
echo ""
exec $command
1 change: 1 addition & 0 deletions src/Bonsai/BonsaiTrainer.cpp
Expand Up @@ -631,6 +631,7 @@ void BonsaiTrainer::dumpModelMeanVar(const std::string& currResultsPath)

writeMatrixInASCII(mean, params_path, "Mean");
writeMatrixInASCII(variance, params_path, "Variance");
LOG_INFO(currResultsPath);
}

size_t BonsaiTrainer::totalNonZeros()
Expand Down

0 comments on commit d7ceeb4

Please sign in to comment.