From 9c804038ccd0337882b602bdc684a1203d65956e Mon Sep 17 00:00:00 2001 From: Afzal Date: Thu, 12 Nov 2020 21:24:48 +0530 Subject: [PATCH 1/6] Update quickstart.rst Plz have a look if I am going correct or not. ###rewording sentences to simplify the understanding --- docs/source/quickstart.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/quickstart.rst b/docs/source/quickstart.rst index 8f472bafbce2..93817ce8eaa8 100644 --- a/docs/source/quickstart.rst +++ b/docs/source/quickstart.rst @@ -1,9 +1,9 @@ Quick start =========== -Welcome to Ignite quick start guide that just gives essentials of getting a project up and running. +Welcome to PyTorch Ignite a quick start guide that just not only gives you the essentials of getting a project up but also running through the code. -In several lines you can get your model training and validating: +In several lines you can get your model trained and validated as shown below through the code: Code ---- From 02ca1fc9dfecd6bea3d6fccb0e38f439c01dfef7 Mon Sep 17 00:00:00 2001 From: Afzal Date: Thu, 12 Nov 2020 21:49:43 +0530 Subject: [PATCH 2/6] Update docs/source/quickstart.rst Co-authored-by: vfdev --- docs/source/quickstart.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/source/quickstart.rst b/docs/source/quickstart.rst index 93817ce8eaa8..f0e55ba3eec9 100644 --- a/docs/source/quickstart.rst +++ b/docs/source/quickstart.rst @@ -1,7 +1,7 @@ Quick start =========== -Welcome to PyTorch Ignite a quick start guide that just not only gives you the essentials of getting a project up but also running through the code. +Welcome to PyTorch-Ignite a quick start guide that just not only gives you the essentials of getting a project up but also running through the code. In several lines you can get your model trained and validated as shown below through the code: @@ -210,4 +210,3 @@ Finally, we start the engine on the training dataset and run it during 100 epoch } for name, metric in val_metrics.items(): metric.attach(trainer, name) - From 3a8b01e6465ea09b9b5dbd3f50cdba1e86b70522 Mon Sep 17 00:00:00 2001 From: Afzal Date: Thu, 12 Nov 2020 22:25:29 +0530 Subject: [PATCH 3/6] Update quickstart.rst --- docs/source/quickstart.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/source/quickstart.rst b/docs/source/quickstart.rst index f0e55ba3eec9..0cb23544fdcf 100644 --- a/docs/source/quickstart.rst +++ b/docs/source/quickstart.rst @@ -1,7 +1,7 @@ Quick start =========== -Welcome to PyTorch-Ignite a quick start guide that just not only gives you the essentials of getting a project up but also running through the code. +Welcome to **PyTorch-Ignite**, a quick start guide that just not only gives you the essentials of getting a project up but also running through the code. In several lines you can get your model trained and validated as shown below through the code: @@ -139,7 +139,7 @@ or equivalently without the decorator trainer.add_event_handler(Events.ITERATION_COMPLETED, log_training_loss) -When an epoch ends we want compute training and validation metrics [#f1]_. For that purpose we can run previously defined +When an epoch ends, we want to compute training and validation metrics [#f1]_. For that purpose, we can run previously defined ``evaluator`` on ``train_loader`` and ``val_loader``. Therefore we attach two additional handlers to the trainer on epoch complete event: @@ -184,10 +184,10 @@ Finally, we start the engine on the training dataset and run it during 100 epoch .. [#f1] - In this example we follow a pattern that requires a second pass through the training set. This + In this example, we follow a pattern that requires a second pass through the training set. This could be expensive on large datasets (even taking a subset). Another more common pattern is to accumulate measures online over an epoch in the training loop. In this case metrics are aggregated on a moving model, - and thus, we do not want to encourage this pattern. However, if user still would like to implement the + and thus, we do not want to encourage this pattern. However, if a user still likes to implement the last pattern, it can be easily done by attaching metrics to the trainer as following: .. code-block:: python From b8a384f083ffeb792c2bfc52a901285b90c03af3 Mon Sep 17 00:00:00 2001 From: Afzal Date: Fri, 13 Nov 2020 12:26:41 +0530 Subject: [PATCH 4/6] Update quickstart.rst --- docs/source/quickstart.rst | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/source/quickstart.rst b/docs/source/quickstart.rst index 0cb23544fdcf..60f0f179812f 100644 --- a/docs/source/quickstart.rst +++ b/docs/source/quickstart.rst @@ -1,7 +1,7 @@ Quick start =========== -Welcome to **PyTorch-Ignite**, a quick start guide that just not only gives you the essentials of getting a project up but also running through the code. +Welcome to **PyTorch-Ignite** short tutorial, a quick start guide that just not only gives you the essentials of getting a project up but also importance of running through the code. In several lines you can get your model trained and validated as shown below through the code: @@ -47,12 +47,12 @@ Code trainer.run(train_loader, max_epochs=100) -Complete code can be found in the file `examples/mnist/mnist.py `_. +**Note**: Complete code can be found in the file `examples/mnist/mnist.py `_. Explanation ----------- -Now let's break up the code and review it in details. In the first 4 lines we define our model, training and validation +Now let's break up the code and review it in details. In the first 4 lines, we define our model, training and validation datasets (as `torch.utils.data.DataLoader `_), optimizer and loss function: .. code-block:: python @@ -62,7 +62,7 @@ datasets (as `torch.utils.data.DataLoader Date: Fri, 13 Nov 2020 14:57:00 +0530 Subject: [PATCH 5/6] Update docs/source/quickstart.rst Co-authored-by: vfdev --- docs/source/quickstart.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/quickstart.rst b/docs/source/quickstart.rst index 60f0f179812f..c7d0002ac7aa 100644 --- a/docs/source/quickstart.rst +++ b/docs/source/quickstart.rst @@ -3,7 +3,7 @@ Quick start Welcome to **PyTorch-Ignite** short tutorial, a quick start guide that just not only gives you the essentials of getting a project up but also importance of running through the code. -In several lines you can get your model trained and validated as shown below through the code: +In several lines you can get your model trained and validated as shown below: Code ---- From 1cc95122153b7574be3de796aac82b46c9fe5f91 Mon Sep 17 00:00:00 2001 From: Afzal Date: Fri, 13 Nov 2020 15:50:49 +0530 Subject: [PATCH 6/6] Update quickstart.rst Final commit is done. You can review it. --- docs/source/quickstart.rst | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/docs/source/quickstart.rst b/docs/source/quickstart.rst index c7d0002ac7aa..f9dffc6089f6 100644 --- a/docs/source/quickstart.rst +++ b/docs/source/quickstart.rst @@ -1,9 +1,9 @@ Quick start =========== -Welcome to **PyTorch-Ignite** short tutorial, a quick start guide that just not only gives you the essentials of getting a project up but also importance of running through the code. +Welcome to **PyTorch-Ignite** quick start guide that just covers the essentials of getting a project up and walking through the code. -In several lines you can get your model trained and validated as shown below: +In several lines of this given code, you can get your model trained and validated as shown below: Code ---- @@ -170,7 +170,7 @@ complete event: trainer.add_event_handler(Events.ITERATION_COMPLETED, log_training_loss, train_loader) -Finally, we start the engine on the training dataset and run it upto 100 epochs: +Finally, we start the engine on the training dataset and run it during 100 epochs: .. code-block:: python @@ -180,11 +180,9 @@ Finally, we start the engine on the training dataset and run it upto 100 epochs: **Where to go next?** To understand better the concepts of the library, please read :doc:`concepts`. -.. Footnotes :: +.. rubric:: Footnotes -.. [#f1] - - In this example, we follow a pattern that requires a second pass through the training set. This +.. [#f1] In this example, we follow a pattern that requires a second pass through the training set. This could be expensive on large datasets (even taking a subset). Another more common pattern is to accumulate measures online over an epoch in the training loop. In this case, metrics are aggregated on a moving model, and thus, we do not want to encourage this pattern. However, if a user still likes to implement the