diff --git a/.gitignore b/.gitignore index 6ca994ebbf196f8fc29f3d9f2815f9416952e996..f49b592282bb3b64e26250494dcdb88fc39a8c6a 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ _work/ .mypy_cache/ .pytest_cache/ results*/ +trainlog.pdf diff --git a/doc/usage/training.rst b/doc/usage/training.rst index 9ca5e01d7a9485dce41ac892a0de338ca6995cd5..f071febe86d44b9e7c171203fd77c643f830fbbc 100644 --- a/doc/usage/training.rst +++ b/doc/usage/training.rst @@ -64,4 +64,23 @@ To train Pasa CNN on the Montgomery dataset: mednet train -vv mlp shenzhen_rs --batch-size=4 --epochs=20 + +Plotting training metrics +------------------------- + +Various metrics are recorded at each epoch during training, such as the execution time, loss and resource usage. +These are saved in a Tensorboard file, located in a `logs` subdirectory of the training output folder. + +Mednet provides a :ref:`train-analysis <mednet.cli>` convenience script that graphs the scalars stored in these files and saves them in a pdf file. + +Examples +======== + +Generates a pdf file with plots showing the evolution of logged metrics in time: + +.. code:: sh + + mednet train-analysis -vv <results/logs/folder> -o <results/trainlog.pdf> + + .. include:: ../links.rst