Add labs on sections 5,7,8
This commit is contained in:
parent
89d1bbd136
commit
0c3c13273e
File diff suppressed because one or more lines are too long
|
|
@ -6,21 +6,12 @@ Lab Assignment from [AI for Beginners Curriculum](https://github.com/microsoft/a
|
|||
|
||||
Solve two classification problems using single- and multi-layered fully-connected networks using PyTorch or TensorFlow:
|
||||
|
||||
1. Iris classification problem
|
||||
1. MNIST handwritten digit classification problem
|
||||
1. **[Iris classification](https://en.wikipedia.org/wiki/Iris_flower_data_set)** problem - an example of problem with tabular input data, which can be handled by classical machine learning. You goal would be to classify irises into 3 classes, based on 4 numeric parameters.
|
||||
1. **MNIST** handwritten digit classification problem which we have seen before.
|
||||
|
||||
Try different network architectures to achieve the best accuracy you can get.
|
||||
|
||||
|
||||
## Stating Notebook
|
||||
|
||||
Start the lab by opening [MyFW_MNIST.ipynb](MyFW_MNIST.ipynb)
|
||||
Start the lab by opening [LabFrameworks.ipynb](LabFrameworks.ipynb)
|
||||
|
||||
## Questions
|
||||
|
||||
As a result of this lab, try to answer the following questions:
|
||||
|
||||
- Does the inter-layer activation function affect network performance?
|
||||
- Do we need 2- or 3-layered network for this task?
|
||||
- Did you experience any problems training the network? Especially as the number of layers increased.
|
||||
- How do weights of the network behave during training? You may plot max abs value of weights vs. epoch to understand the relation.
|
||||
|
|
|
|||
|
|
@ -49,6 +49,9 @@ As an example, let's look at the architecture of VGG-16, a network that achieved
|
|||
|
||||
[**Often Used CNN Architectures**](CNN_Architectures.md)
|
||||
|
||||
## [Lab](lab/README.md)
|
||||
|
||||
In the lab, you are tasked with classification of different cats and dogs breeds. Images are more complex than MNIST dataset and of higher dimensions, and there are more than 10 classes.
|
||||
## CNNs for Other Tasks
|
||||
|
||||
While CNNs are most often used for Computer Vision tasks, they are generally good for extracting fix-sized patterns. For example, if we are dealing with sounds, we may also want to use CNNs to look for some specific patterns in audio signal - in which case filters would be 1-dimensional (and this CNN would be called 1D-CNN). Also, sometimes 3D-CNN is used to extract features in multi-dimensional space, such as certain events occurring on video - CNN can capture certain patterns of feature changing over time.
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,31 @@
|
|||
# Classification of Pets Faces
|
||||
|
||||
Lab Assignment from [AI for Beginners Curriculum](https://github.com/microsoft/ai-for-beginners).
|
||||
|
||||
## Task
|
||||
|
||||
Imagine you need to develop and application for pet nursery to catalog all pets. One of the great features of such an application would be automatically discovering the breed from a photograph. This can be successfully done using neural networks.
|
||||
|
||||
You need to train a convolutional neural network to classify different breeds of cats and dogs using **Pet Faces** dataset.
|
||||
|
||||
## The Dataset
|
||||
|
||||
We will use the **Pet Faces** dataset, derived from [Oxford-IIIT](https://www.robots.ox.ac.uk/~vgg/data/pets/) pets dataset. It contains 35 different breeds of dogs and cats.
|
||||
|
||||

|
||||
|
||||
To download the dataset, use this code snippet:
|
||||
|
||||
```python
|
||||
!wget https://mslearntensorflowlp.blob.core.windows.net/data/petfaces.tar.gz
|
||||
!tar xfz petfaces.tar.gz
|
||||
!rm petfaces.tar.gz
|
||||
```
|
||||
|
||||
## Stating Notebook
|
||||
|
||||
Start the lab by opening [PetFaces.ipynb](PetFaces.ipynb)
|
||||
|
||||
## Takeaway
|
||||
|
||||
You have solved a relatively complex problem of image classification from scratch! There were quite a lot of classes, and you were still able to get reasonable accuracy! It also makes sense to measure top-k accuracy, because it is easy to confuse some of the classes which are not clearly different even to human beings.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 634 KiB |
|
|
@ -29,3 +29,7 @@ Let's see transfer learning in action in corresponding notebooks:
|
|||
* [Transfer Learning - PyTorch](TransferLearningPyTorch.ipynb)
|
||||
* [Transfer Learning - TensorFlow](TransferLearningTF.ipynb)
|
||||
|
||||
## [Lab](lab/README.md)
|
||||
|
||||
In this lab, we will use real-life [Oxford-IIIT](https://www.robots.ox.ac.uk/~vgg/data/pets/) pets dataset with 35 breeds of cats and dogs, and we will build a transfer learning classifier.
|
||||
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,29 @@
|
|||
# Classification of Oxford Pets using Transfer Learning
|
||||
|
||||
Lab Assignment from [AI for Beginners Curriculum](https://github.com/microsoft/ai-for-beginners).
|
||||
|
||||
## Task
|
||||
|
||||
Imagine you need to develop and application for pet nursery to catalog all pets. One of the great features of such an application would be automatically discovering the breed from a photograph. In this assignment, we will use transfer learning to classify real-life pet images from [Oxford-IIIT](https://www.robots.ox.ac.uk/~vgg/data/pets/) pets dataset.
|
||||
|
||||
## The Dataset
|
||||
|
||||
We will use the original [Oxford-IIIT](https://www.robots.ox.ac.uk/~vgg/data/pets/) pets dataset, which contains 35 different breeds of dogs and cats.
|
||||
|
||||
To download the dataset, use this code snippet:
|
||||
|
||||
```python
|
||||
!wget https://mslearntensorflowlp.blob.core.windows.net/data/oxpets_images.tar.gz
|
||||
!tar xfz oxpets_images.tar.gz
|
||||
!rm oxpets_images.tar.gz
|
||||
```
|
||||
|
||||
## Stating Notebook
|
||||
|
||||
Start the lab by opening [OxfordPets.ipynb](OxfordPets.ipynb)
|
||||
|
||||
|
||||
## Takeaway
|
||||
|
||||
Transfer learning and pre-trained networks allow us to solve real-world image classification problems relatively easily. However, pre-trained networks work well on images of similar kind, and if we start classifying very different images (eg. medical images), we are likely to get much worse results.
|
||||
|
||||
|
|
@ -53,14 +53,15 @@ For a gentle introduction to *AI in the Cloud* topic you may consider taking the
|
|||
<td>Intro to Frameworks (PyTorch/TensorFlow)<br/>Overfitting</td>
|
||||
<td><a href="3-NeuralNetworks/05-Frameworks/README.md">Text</a><br/><a href="3-NeuralNetworks/05-Frameworks/Overfitting.md">Text</a></td>
|
||||
<td><a href="3-NeuralNetworks/05-Frameworks/IntroPyTorch.ipynb">PyTorch</td>
|
||||
<td><a href="3-NeuralNetworks/05-Frameworks/IntroKerasTF.md">Keras/TensorFlow</td><td></td></tr>
|
||||
<td><a href="3-NeuralNetworks/05-Frameworks/IntroKerasTF.md">Keras/TensorFlow</td>
|
||||
<td><a href="3-NeuralNetworks/05-Frameworks/lab/README.md">Lab</a></td></tr>
|
||||
<tr><td>IV</td><td colspan="2"><b><a href="4-ComputerVision/README.md">Computer Vision</a></b></td>
|
||||
<td><a href="https://docs.microsoft.com/learn/modules/intro-computer-vision-pytorch/?WT.mc_id=academic-33554-dmitryso">MS Learn</a></td>
|
||||
<td><a href="https://docs.microsoft.com/learn/modules/intro-computer-vision-TensorFlow/?WT.mc_id=academic-33554-dmitryso">MS Learn</a></td>
|
||||
<td>PAT</td></tr>
|
||||
<tr><td>6</td><td>Intro to Computer Vision. OpenCV</td><td>Text<td colspan="2">Notebook</td><td></td></tr>
|
||||
<tr><td>7</td><td>Convolutional Neural Networks<br/>CNN Architectures</td><td><a href="4-ComputerVision/07-ConvNets/README.md">Text</a><br/><a href="4-ComputerVision/07-ConvNets/CNN_Architectures.md">Text</a></td><td><a href="4-ComputerVision/07-ConvNets/ConvNetsPyTorch.ipynb">PyTorch</a></td><td><a href="4-ComputerVision/07-ConvNets/ConvNetsTF.ipynb">TensorFlow</a></td><td></td></tr>
|
||||
<tr><td>8</td><td>Pre-trained Networks and Transfer Learning<br/>Training Tricks</td><td><a href="4-ComputerVision/08-TransferLearning/README.md">Text</a><br/><a href="4-ComputerVision/08-TransferLearning/TrainingTricks.md">Text</a></td><td><a href="4-ComputerVision/08-TransferLearning/TransferLearningPyTorch.ipynb">PyTorch</a></td><td><a href="4-ComputerVision/08-TransferLearning/TransferLearningTF.ipynb">TensorFlow</a><br/><a href="4-ComputerVision/08-TransferLearning/Dropout.ipynb">Dropout sample</a></td><td></td></tr>
|
||||
<tr><td>7</td><td>Convolutional Neural Networks<br/>CNN Architectures</td><td><a href="4-ComputerVision/07-ConvNets/README.md">Text</a><br/><a href="4-ComputerVision/07-ConvNets/CNN_Architectures.md">Text</a></td><td><a href="4-ComputerVision/07-ConvNets/ConvNetsPyTorch.ipynb">PyTorch</a></td><td><a href="4-ComputerVision/07-ConvNets/ConvNetsTF.ipynb">TensorFlow</a></td><td><a href="4-ComputerVision/07-ConvNets/lab/README.md">Lab</a></td></tr>
|
||||
<tr><td>8</td><td>Pre-trained Networks and Transfer Learning<br/>Training Tricks</td><td><a href="4-ComputerVision/08-TransferLearning/README.md">Text</a><br/><a href="4-ComputerVision/08-TransferLearning/TrainingTricks.md">Text</a></td><td><a href="4-ComputerVision/08-TransferLearning/TransferLearningPyTorch.ipynb">PyTorch</a></td><td><a href="4-ComputerVision/08-TransferLearning/TransferLearningTF.ipynb">TensorFlow</a><br/><a href="4-ComputerVision/08-TransferLearning/Dropout.ipynb">Dropout sample</a></td><td><a href="4-ComputerVision/08-TransferLearning/lab/README.md">Lab</a></td></tr>
|
||||
<tr><td>9</td><td>Autoencoders and VAEs</td><td><a href="4-ComputerVision/09-Autoencoders/README.md">Text</a></td><td>PyTorch</td><td><a href="4-ComputerVision/09-Autoencoders/AutoencodersTF.ipynb">TensorFlow</a></td><td></td></tr>
|
||||
<tr><td>10</td><td>Generative Adversarial Networks</td><td><a href="4-ComputerVision/10-GANs/README.md">Text</a></td><td>PyTorch</td><td><a href="4-ComputerVision/10-GANs/GANs.ipynb">TensorFlow</a></td><td></td></tr>
|
||||
<tr><td>11</td><td>Object Detection</td><td>Text</td><td>PyTorch</td><td>TensorFlow</td><td></td></tr>
|
||||
|
|
|
|||
Loading…
Reference in New Issue