diff --git a/NonLinearSolver/modelReduction/Tree.cpp b/NonLinearSolver/modelReduction/Tree.cpp index e00abd926827ab13449157c16b9af3d2b7b99711..185581bb43f57cfa230ca5739b0517fd8828f4ca 100644 --- a/NonLinearSolver/modelReduction/Tree.cpp +++ b/NonLinearSolver/modelReduction/Tree.cpp @@ -311,7 +311,15 @@ void Tree::createRandomTreeSameDepthForNodes(int nbLeaves, int numChildMax, int } else { - outPut.push_back(numChilds+remaining); + if (numChilds+remaining < 4) + { + outPut.push_back(numChilds+remaining); + } + else + { + outPut.push_back(2); + outPut.push_back(numChilds+remaining-2); + } iter += numChilds+remaining; } }; diff --git a/cm3apps/install.txt b/cm3apps/install.txt index 48b68a813b0916d3f5b21751af6fe4c62ed5b6af..41516f33d0fc6454793e020cf973c65b8bb0cf41 100644 --- a/cm3apps/install.txt +++ b/cm3apps/install.txt @@ -492,8 +492,8 @@ C) Install Open Cascade (optional) D) Install Torch cd local // no gpu - wget https://download.pytorch.org/libtorch/cpu/libtorch-shared-with-deps-1.4.0%2Bcpu.zip - unzip libtorch-shared-with-deps-1.4.0+cpu.zip + wget https://download.pytorch.org/libtorch/cpu/libtorch-shared-with-deps-1.4.0%2Bcpu.zip + unzip libtorch-shared-with-deps-1.4.0+cpu.zip // gpu 1) clean up sudo rm /etc/apt/sources.list.d/cuda* @@ -519,16 +519,14 @@ D) Install Torch 4) install cudnn download cudnn from nvidia (you need to register and downloadmanualy https://developer.nvidia.com/compute/machine-learning/cudnn/secure/8.0.4/11.0_20200923/cudnn-11.0-linux-x64-v8.0.4.30.tgz - - - - -A -A - - sudo apt-get install nvidia-cuda-toolkit - //check version nvcc --version - wget https://download.pytorch.org/libtorch/cu110/libtorch-shared-with-deps-1.7.0%2Bcu110.zip + copy in your local directory + tar xvf cudnn-11.0-linux-x64-v8.0.4.30.tgz + sudo cp cuda/include/cudnn*.h /usr/local/cuda/include + sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64 + sudo chmod a+r /usr/local/cuda/include/cudnn*.h /usr/local/cuda/lib64/libcudnn* + 5) download torch with gpu + wget https://download.pytorch.org/libtorch/cu110/libtorch-shared-with-deps-1.7.0%2Bcu110.zip + unzip libtorch-shared-with-deps-1.7.0%2Bcu110.zip add export TORCHDIR=$HOME/local/libtorch in your .bashrc