From e62ccde0b85a61c69daec68195da2a6b93f4d068 Mon Sep 17 00:00:00 2001 From: thorstenwagner <twa1@posteo.de> Date: Tue, 5 Dec 2023 15:31:27 +0100 Subject: [PATCH 1/3] add small training tutorial --- docs/developer/devs.rst | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/docs/developer/devs.rst b/docs/developer/devs.rst index a16b8e1..4413a05 100644 --- a/docs/developer/devs.rst +++ b/docs/developer/devs.rst @@ -32,11 +32,30 @@ Now you are in principle set to train your network (see ``How to train TomoTwin` How to train TomoTwin ********************* +Here we describe how to train the SiameseNet (bad name, as it is actually a tripletnetwork). Hardwarewise, 12GB of GPU memory should be enough. + +1. Download training and validation data + Training and validation set can be found here: https://zenodo.org/record/6637456 -More will follow soon :-) +Download and untar training and validation data. + +2. Download siamese network config + +You find the configuration file here: +https://github.com/MPI-Dortmund/tomotwin-cryoet/blob/main/resources/configs/config_siamese.json + + +3. Start the training + + + .. prompt:: bash $ + + tomotwin_train.py -v path/train/volumes/ --validvolumes path/valid/volumes/ -o out_train -nc path/to/siamese_network.json --epochs 300 + + How to evaluate TomoTwin From a025b58c5c18fdd64064d01d8384802aefcef396 Mon Sep 17 00:00:00 2001 From: thorstenwagner <twa1@posteo.de> Date: Tue, 5 Dec 2023 15:49:55 +0100 Subject: [PATCH 2/3] make it pretty --- docs/developer/devs.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/developer/devs.rst b/docs/developer/devs.rst index 4413a05..e4d47a5 100644 --- a/docs/developer/devs.rst +++ b/docs/developer/devs.rst @@ -35,6 +35,7 @@ How to train TomoTwin Here we describe how to train the SiameseNet (bad name, as it is actually a tripletnetwork). Hardwarewise, 12GB of GPU memory should be enough. 1. Download training and validation data +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Training and validation set can be found here: @@ -43,19 +44,20 @@ https://zenodo.org/record/6637456 Download and untar training and validation data. 2. Download siamese network config +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ You find the configuration file here: -https://github.com/MPI-Dortmund/tomotwin-cryoet/blob/main/resources/configs/config_siamese.json +https://github.com/MPI-Dortmund/tomotwin-cryoet/blob/main/resources/configs/config_siamese.json 3. Start the training +^^^^^^^^^^^^^^^^^^^^^ +To run it on one GPU do: .. prompt:: bash $ - tomotwin_train.py -v path/train/volumes/ --validvolumes path/valid/volumes/ -o out_train -nc path/to/siamese_network.json --epochs 300 - - + CUDA_VISIBLE_DEVICES=0 tomotwin_train.py -v path/train/volumes/ --validvolumes path/valid/volumes/ -o out_train -nc path/to/siamese_network.json --epochs 300 How to evaluate TomoTwin From 2196b8165263f85cebcac7cb1a5fd3346a284639 Mon Sep 17 00:00:00 2001 From: thorstenwagner <twa1@posteo.de> Date: Tue, 5 Dec 2023 15:53:00 +0100 Subject: [PATCH 3/3] make it pretty --- docs/developer/devs.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developer/devs.rst b/docs/developer/devs.rst index e4d47a5..a2728b0 100644 --- a/docs/developer/devs.rst +++ b/docs/developer/devs.rst @@ -53,7 +53,7 @@ https://github.com/MPI-Dortmund/tomotwin-cryoet/blob/main/resources/configs/conf 3. Start the training ^^^^^^^^^^^^^^^^^^^^^ -To run it on one GPU do: +To run it on one GPU for 300 epochs do: .. prompt:: bash $