From 7714b13d43b45b2e0c49c00bab3793bbc4691c09 Mon Sep 17 00:00:00 2001 From: Hanlin Tang Date: Tue, 1 Mar 2022 01:34:37 +0000 Subject: [PATCH] update notebooks --- notebooks/custom_method_tutorial.ipynb | 4 ++-- notebooks/nlp_notebook_tutorial.ipynb | 2 +- notebooks/up_and_running_with_composer.ipynb | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/notebooks/custom_method_tutorial.ipynb b/notebooks/custom_method_tutorial.ipynb index da71b036a9..3db8805a73 100644 --- a/notebooks/custom_method_tutorial.ipynb +++ b/notebooks/custom_method_tutorial.ipynb @@ -94,7 +94,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Next, we will define a model. For this, we will simply use composer's ResNet56. For using your own custom model, please see the [custom models tutorial](https://docs.mosaicml.com/en/v0.3.1/tutorials/adding_models_datasets.html#models). One quirk to be aware of with this model is that the forward method takes in an (X, y) pair of inputs and targets, essentially what the dataloaders will spit out." + "Next, we will define a model. For this, we will simply use composer's ResNet56. For using your own custom model, please see the [custom models tutorial](https://docs.mosaicml.com/en/stable/tutorials/adding_models_datasets.html#models). One quirk to be aware of with this model is that the forward method takes in an (X, y) pair of inputs and targets, essentially what the dataloaders will spit out." ] }, { @@ -184,7 +184,7 @@ "source": [ "\n", "\n", - "For this tutorial, we'll look at how to implement one of the simpler speedup methods currently in our composer library: [ColOut](https://docs.mosaicml.com/en/v0.3.1/method_cards/col_out.html). This method works on image data by dropping random rows and columns from the training images. This reduces the size of the training images, which reduces the time per training iteration, and hopefully does not alter the semantic content of the image too much. Additionally, dropping a small fraction of random rows and columns can also slightly distort objects, and perhaps provide a data augmentation effect.\n", + "For this tutorial, we'll look at how to implement one of the simpler speedup methods currently in our composer library: [ColOut](https://docs.mosaicml.com/en/stable/method_cards/col_out.html). This method works on image data by dropping random rows and columns from the training images. This reduces the size of the training images, which reduces the time per training iteration, and hopefully does not alter the semantic content of the image too much. Additionally, dropping a small fraction of random rows and columns can also slightly distort objects, and perhaps provide a data augmentation effect.\n", "\n", "To start our implementation, we'll write a function to drop random rows and columns from a batch of input images. We'll assume that these are torch tensors and operate on a batch rather than individual images for simplicity here.\n", "\n" diff --git a/notebooks/nlp_notebook_tutorial.ipynb b/notebooks/nlp_notebook_tutorial.ipynb index 728f287be9..1261025a76 100644 --- a/notebooks/nlp_notebook_tutorial.ipynb +++ b/notebooks/nlp_notebook_tutorial.ipynb @@ -220,7 +220,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We will now specify a composer `Trainer` object and run our training! `Trainer` has many arguments that are described in our [documentation](https://docs.mosaicml.com/en/v0.3.1/trainer.html#composer.Trainer), but let's discuss the less obvious arguments used below:\n", + "We will now specify a composer `Trainer` object and run our training! `Trainer` has many arguments that are described in our [documentation](https://docs.mosaicml.com/en/stable/trainer.html#composer.Trainer), but let's discuss the less obvious arguments used below:\n", "- `max_duration` - a string specifying how long to train either in terms of batches (e.g. '10ba' is 10 batches) or epochs (e.g. '1ep' is 1 epoch).\n", "- `schedulers` - a list of PyTorch learning rate schedulers that will be composed together.\n", "- `device` - specifies if the training will be done on CPU or GPU by using 'cpu' or 'gpu', respectively.\n", diff --git a/notebooks/up_and_running_with_composer.ipynb b/notebooks/up_and_running_with_composer.ipynb index 5097678af7..66e3ed3bef 100644 --- a/notebooks/up_and_running_with_composer.ipynb +++ b/notebooks/up_and_running_with_composer.ipynb @@ -102,7 +102,7 @@ "source": [ "## Model\n", "\n", - "Next, we create our model. We're using composer's built-in ResNet56. To use your own custom model, please see the [custom models tutorial](https://docs.mosaicml.com/en/v0.3.1/tutorials/adding_models_datasets.html#models)." + "Next, we create our model. We're using composer's built-in ResNet56. To use your own custom model, please see the [custom models tutorial](https://docs.mosaicml.com/en/stable/tutorials/adding_models_datasets.html#models)." ] }, { @@ -232,7 +232,7 @@ "source": [ "One of the things we're most excited about at MosaicML is our speed-up algorithms. We used these algorithms to [speed up training of ResNet50 on ImageNet by up to 3.4x](https://app.mosaicml.com/explorer/imagenet). Let's try applying a few algorithms to make our ResNet56 more efficient.\n", "\n", - "We'll start with [ColOut](https://docs.mosaicml.com/en/v0.3.1/method_cards/col_out.html), which is an in-house invention. Colout drops rows and columns of an image with probability *p*. It's a little bit like [Random Erasing](https://arxiv.org/abs/1708.04896) except it reduces the size of the image, which can increase data throughput and speed up training." + "We'll start with [ColOut](https://docs.mosaicml.com/en/stable/method_cards/col_out.html), which is an in-house invention. Colout drops rows and columns of an image with probability *p*. It's a little bit like [Random Erasing](https://arxiv.org/abs/1708.04896) except it reduces the size of the image, which can increase data throughput and speed up training." ] }, { @@ -248,7 +248,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Let's also use [BlurPool](https://docs.mosaicml.com/en/v0.3.1/method_cards/blurpool.html), which increases accuracy by applying a spatial low-pass filter before the pool in max pooling and whenever using a strided convolution." + "Let's also use [BlurPool](https://docs.mosaicml.com/en/stable/method_cards/blurpool.html), which increases accuracy by applying a spatial low-pass filter before the pool in max pooling and whenever using a strided convolution." ] }, { @@ -268,7 +268,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Our final algorithm in our improved training recipe is [Progressive Image Resizing](https://docs.mosaicml.com/en/v0.3.1/method_cards/progressive_resizing_vision.html). Progressive Image Resizing initially shrinks the size of training images and slowly scales them back to their full size over the course of training. It increases throughput during the early phase of training, when the network may learn coarse-grained features that do not require details lost by reducing image resolution." + "Our final algorithm in our improved training recipe is [Progressive Image Resizing](https://docs.mosaicml.com/en/stable/method_cards/progressive_resizing_vision.html). Progressive Image Resizing initially shrinks the size of training images and slowly scales them back to their full size over the course of training. It increases throughput during the early phase of training, when the network may learn coarse-grained features that do not require details lost by reducing image resolution." ] }, {