Feat: add new Markdown parser (#39800)

and change all the challenges to new `md` format.
This commit is contained in:
Oliver Eyton-Williams
2020-11-27 19:02:05 +01:00
committed by GitHub
parent a07f84c8ec
commit 0bd52f8bd1
2580 changed files with 113436 additions and 111979 deletions

View File

@ -5,30 +5,29 @@ challengeType: 11
videoId: bejQ-W9BGJg
---
## Description
# --question--
<section id='description'>
</section>
## --text--
## Tests
How should you assign weights to input neurons before training your network for the first time?
<section id='tests'>
## --answers--
```yml
question:
text: |
How should you assign weights to input neurons before training your network for the first time?
From smallest to largest.
answers:
- |
From smallest to largest.
- |
Completely randomly.
- |
Alphabetically.
- |
None of the above.
solution: 2
```
---
Completely randomly.
---
Alphabetically.
---
None of the above.
## --video-solution--
2
</section>

View File

@ -5,28 +5,25 @@ challengeType: 11
videoId: Y5M7KH4A4n4
---
## Description
# --question--
<section id='description'>
</section>
## --text--
## Tests
When are Convolutional Neural Networks not useful?
<section id='tests'>
## --answers--
```yml
question:
text: |
When are Convolutional Neural Networks not useful?
If your data can't be made to look like an image, or if you can rearrange elements of your data and it's still just as useful.
answers:
- |
If your data can't be made to look like an image, or if you can rearrange elements of your data and it's still just as useful.
- |
If your data is made up of different 2D or 3D images.
- |
If your data is text or sound based.
solution: 1
```
---
If your data is made up of different 2D or 3D images.
---
If your data is text or sound based.
## --video-solution--
1
</section>

View File

@ -5,28 +5,25 @@ challengeType: 11
videoId: zvalnHWGtx4
---
## Description
# --question--
<section id='description'>
</section>
## --text--
## Tests
Why is it better to calculate the gradient (slope) directly rather than numerically?
<section id='tests'>
## --answers--
```yml
question:
text: |
Why is it better to calculate the gradient (slope) directly rather than numerically?
It is computationally expensive to go back through the entire neural network and adjust the weights for each layer of the neural network.
answers:
- |
It is computationally expensive to go back through the entire neural network and adjust the weights for each layer of the neural network.
- |
It is more accurate.
- |
There is no difference between the two methods.
solution: 1
```
---
It is more accurate.
---
There is no difference between the two methods.
## --video-solution--
1
</section>

View File

@ -5,28 +5,25 @@ challengeType: 11
videoId: UVimlsy9eW0
---
## Description
# --question--
<section id='description'>
</section>
## --text--
## Tests
What are the main neural network components that make up a Long Short Term Memory network?
<section id='tests'>
## --answers--
```yml
question:
text: |
What are the main neural network components that make up a Long Short Term Memory network?
New information and prediction.
answers:
- |
New information and prediction.
- |
Prediction, collected possibilities, and selection.
- |
Prediction, ignoring, forgetting, and selection.
solution: 3
```
---
Prediction, collected possibilities, and selection.
---
Prediction, ignoring, forgetting, and selection.
## --video-solution--
3
</section>

View File

@ -4,49 +4,32 @@ title: Book Recommendation Engine using KNN
challengeType: 10
---
## Description
<section id='description'>
# --description--
In this challenge, you will create a book recommendation algorithm using K-Nearest Neighbors.
You will use the Book-Crossings dataset. This dataset contains 1.1 million ratings (scale of 1-10) of 270,000 books by 90,000 users.
You can access <a href='https://colab.research.google.com/github/freeCodeCamp/boilerplate-book-recommendation-engine/blob/master/fcc_book_recommendation_knn.ipynb' target='_blank'>the full project instructions and starter code on Google Colaboratory</a>.
You can access [the full project instructions and starter code on Google Colaboratory](https://colab.research.google.com/github/freeCodeCamp/boilerplate-book-recommendation-engine/blob/master/fcc_book_recommendation_knn.ipynb).
After going to that link, create a copy of the notebook either in your own account or locally. Once you complete the project and it passes the test (included at that link), submit your project link below. If you are submitting a Google Colaboratory link, make sure to turn on link sharing for "anyone with the link."
We are still developing the interactive instructional content for the machine learning curriculum. For now, you can go through the video challenges in this certification. You may also have to seek out additional learning resources, similar to what you would do when working on a real-world project.
</section>
# --hints--
## Instructions
<section id='instructions'>
It should pass all Python tests.
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: 'It should pass all Python tests.'
testString: ''
```js
```
</section>
# --seed--
## Challenge Seed
<section id='challengeSeed'>
</section>
## Solution
<section id='solution'>
# --solutions--
```py
# Python challenges don't need solutions,
# because they would need to be tested against a full working project.
# Please check our contributing guidelines to learn more.
```
</section>

View File

@ -4,47 +4,30 @@ title: Cat and Dog Image Classifier
challengeType: 10
---
## Description
<section id='description'>
# --description--
For this challenge, you will use TensorFlow 2.0 and Keras to create a convolutional neural network that correctly classifies images of cats and dogs with at least 63% accuracy.
You can access <a href='https://colab.research.google.com/github/freeCodeCamp/boilerplate-cat-and-dog-image-classifier/blob/master/fcc_cat_dog.ipynb' target='_blank'>the full project instructions and starter code on Google Colaboratory</a>.
You can access [the full project instructions and starter code on Google Colaboratory](https://colab.research.google.com/github/freeCodeCamp/boilerplate-cat-and-dog-image-classifier/blob/master/fcc_cat_dog.ipynb).
After going to that link, create a copy of the notebook either in your own account or locally. Once you complete the project and it passes the test (included at that link), submit your project link below. If you are submitting a Google Colaboratory link, make sure to turn on link sharing for "anyone with the link."
We are still developing the interactive instructional content for the machine learning curriculum. For now, you can go through the video challenges in this certification. You may also have to seek out additional learning resources, similar to what you would do when working on a real-world project.
</section>
# --hints--
## Instructions
<section id='instructions'>
It should pass all Python tests.
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: 'It should pass all Python tests.'
testString: ''
```js
```
</section>
# --seed--
## Challenge Seed
<section id='challengeSeed'>
</section>
## Solution
<section id='solution'>
# --solutions--
```py
# Python challenges don't need solutions,
# because they would need to be tested against a full working project.
# Please check our contributing guidelines to learn more.
```
</section>

View File

@ -4,49 +4,32 @@ title: Linear Regression Health Costs Calculator
challengeType: 10
---
## Description
<section id='description'>
# --description--
In this challenge, you will predict healthcare costs using a regression algorithm.
You are given a dataset that contains information about different people including their healthcare costs. Use the data to predict healthcare costs based on new data.
You can access <a href='https://colab.research.google.com/github/freeCodeCamp/boilerplate-linear-regression-health-costs-calculator/blob/master/fcc_predict_health_costs_with_regression.ipynb' target='_blank'>the full project instructions and starter code on Google Colaboratory</a>.
You can access [the full project instructions and starter code on Google Colaboratory](https://colab.research.google.com/github/freeCodeCamp/boilerplate-linear-regression-health-costs-calculator/blob/master/fcc_predict_health_costs_with_regression.ipynb).
After going to that link, create a copy of the notebook either in your own account or locally. Once you complete the project and it passes the test (included at that link), submit your project link below. If you are submitting a Google Colaboratory link, make sure to turn on link sharing for "anyone with the link."
We are still developing the interactive instructional content for the machine learning curriculum. For now, you can go through the video challenges in this certification. You may also have to seek out additional learning resources, similar to what you would do when working on a real-world project.
</section>
# --hints--
## Instructions
<section id='instructions'>
It should pass all Python tests.
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: 'It should pass all Python tests.'
testString: ''
```js
```
</section>
# --seed--
## Challenge Seed
<section id='challengeSeed'>
</section>
## Solution
<section id='solution'>
# --solutions--
```py
# Python challenges don't need solutions,
# because they would need to be tested against a full working project.
# Please check our contributing guidelines to learn more.
```
</section>

View File

@ -4,47 +4,30 @@ title: Neural Network SMS Text Classifier
challengeType: 10
---
## Description
<section id='description'>
# --description--
In this challenge, you need to create a machine learning model that will classify SMS messages as either "ham" or "spam". A "ham" message is a normal message sent by a friend. A "spam" message is an advertisement or a message sent by a company.
You can access <a href='https://colab.research.google.com/github/freeCodeCamp/boilerplate-neural-network-sms-text-classifier/blob/master/fcc_sms_text_classification.ipynb' target='_blank'>the full project instructions and starter code on Google Colaboratory</a>.
You can access [the full project instructions and starter code on Google Colaboratory](https://colab.research.google.com/github/freeCodeCamp/boilerplate-neural-network-sms-text-classifier/blob/master/fcc_sms_text_classification.ipynb).
After going to that link, create a copy of the notebook either in your own account or locally. Once you complete the project and it passes the test (included at that link), submit your project link below. If you are submitting a Google Colaboratory link, make sure to turn on link sharing for "anyone with the link."
We are still developing the interactive instructional content for the machine learning curriculum. For now, you can go through the video challenges in this certification. You may also have to seek out additional learning resources, similar to what you would do when working on a real-world project.
</section>
# --hints--
## Instructions
<section id='instructions'>
It should pass all Python tests.
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: 'It should pass all Python tests.'
testString: ''
```js
```
</section>
# --seed--
## Challenge Seed
<section id='challengeSeed'>
</section>
## Solution
<section id='solution'>
# --solutions--
```py
# Python challenges don't need solutions,
# because they would need to be tested against a full working project.
# Please check our contributing guidelines to learn more.
```
</section>

View File

@ -4,46 +4,30 @@ title: Rock Paper Scissors
challengeType: 10
---
## Description
<section id='description'>
# --description--
For this challenge, you will create a program to play Rock, Paper, Scissors. A program that picks at random will usually win 50% of the time. To pass this challenge your program must play matches against four different bots, winning at least 60% of the games in each match.
You can access <a href='https://repl.it/github/freeCodeCamp/boilerplate-rock-paper-scissors' target='_blank'>the full project description and starter code on repl.it</a>.
You can access [the full project description and starter code on repl.it](https://repl.it/github/freeCodeCamp/boilerplate-rock-paper-scissors).
After going to that link, fork the project. Once you complete the project based on the instructions in 'README.md', submit your project link below.
We are still developing the interactive instructional part of the machine learning curriculum. For now, you will have to use other resources to learn how to pass this challenge.
</section>
## Instructions
<section id='instructions'>
# --hints--
</section>
It should pass all Python tests.
## Tests
<section id='tests'>
```yml
tests:
- text: 'It should pass all Python tests.'
testString: ''
```js
```
</section>
# --seed--
## Challenge Seed
<section id='challengeSeed'>
</section>
## Solution
<section id='solution'>
# --solutions--
```py
# Python challenges don't need solutions,
# because they would need to be tested against a full working project.
# Please check our contributing guidelines to learn more.
```
</section>

View File

@ -5,27 +5,25 @@ challengeType: 11
videoId: LMNub5frQi4
---
## Description
# --question--
<section id='description'>
</section>
## --text--
## Tests
Most people that are experts in AI or machine learning usually...:
<section id='tests'>
## --answers--
```yml
question:
text: |
Most people that are experts in AI or machine learning usually...:
answers:
- |
have one specialization.
- |
have many specializations.
- |
have a deep understanding of many different frameworks.
solution: 1
```
have one specialization.
---
have many specializations.
---
have a deep understanding of many different frameworks.
## --video-solution--
1
</section>

View File

@ -5,27 +5,25 @@ challengeType: 11
videoId: eCATNvwraXg
---
## Description
# --question--
<section id='description'>
</section>
## --text--
## Tests
What is **not** a good way to increase the accuracy of a convolutional neural network?
<section id='tests'>
## --answers--
```yml
question:
text: |
What is **not** a good way to increase the accuracy of a convolutional neural network?
answers:
- |
Augmenting the data you already have.
- |
Using a pre-trained model.
- |
Using your test data to retrain the model.
solution: 3
```
Augmenting the data you already have.
---
Using a pre-trained model.
---
Using your test data to retrain the model.
## --video-solution--
3
</section>

View File

@ -5,46 +5,44 @@ challengeType: 11
videoId: h1XUt1AgIOI
---
## Description
<section id='description'>
</section>
# --question--
## Tests
<section id='tests'>
## --text--
```yml
question:
text: |
Fill in the blanks below to use Google's pre-trained MobileNet V2 model as a base for a convolutional neural network:
Fill in the blanks below to use Google's pre-trained MobileNet V2 model as a base for a convolutional neural network:
```py
base_model = tf.__A__.applications.__B__(input_shape=(160, 160, 3),
include_top=__C__,
weights='imagenet'
)
```
answers:
- |
A: `keras`
B: `MobileNetV2`
C: `False`
- |
A: `Keras`
B: `MobileNetV2`
C: `True`
- |
A: `keras`
B: `mobile_net_v2`
C: `False`
solution: 1
```py
base_model = tf.__A__.applications.__B__(input_shape=(160, 160, 3),
include_top=__C__,
weights='imagenet'
)
```
</section>
## --answers--
A: `keras`
B: `MobileNetV2`
C: `False`
---
A: `Keras`
B: `MobileNetV2`
C: `True`
---
A: `keras`
B: `mobile_net_v2`
C: `False`
## --video-solution--
1

View File

@ -5,27 +5,25 @@ challengeType: 11
videoId: LrdmcQpTyLw
---
## Description
# --question--
<section id='description'>
</section>
## --text--
## Tests
What are the three main properties of each convolutional layer?
<section id='tests'>
## --answers--
```yml
question:
text: |
What are the three main properties of each convolutional layer?
answers:
- |
Input size, the number of filters, and the sample size of the filters.
- |
Input size, input dimensions, and the color values of the input.
- |
Input size, input padding, and stride.
solution: 1
```
Input size, the number of filters, and the sample size of the filters.
---
Input size, input dimensions, and the color values of the input.
---
Input size, input padding, and stride.
## --video-solution--
1
</section>

View File

@ -5,27 +5,25 @@ challengeType: 11
videoId: _1kTP7uoU9E
---
## Description
# --question--
<section id='description'>
</section>
## --text--
## Tests
Dense neural networks analyze input on a global scale and recognize patterns in specific areas. Convolutional neural networks...:
<section id='tests'>
## --answers--
```yml
question:
text: |
Dense neural networks analyze input on a global scale and recognize patterns in specific areas. Convolutional neural networks...:
answers:
- |
also analyze input globally and extract features from specific areas.
- |
do not work well for image classification or object detection.
- |
scan through the entire input a little at a time and learn local patterns.
solution: 3
```
also analyze input globally and extract features from specific areas.
---
do not work well for image classification or object detection.
---
scan through the entire input a little at a time and learn local patterns.
## --video-solution--
3
</section>

View File

@ -5,27 +5,25 @@ challengeType: 11
videoId: 5wHw8BTd2ZQ
---
## Description
# --question--
<section id='description'>
</section>
## --text--
## Tests
What kind of estimator/model does TensorFlow recommend using for classification?
<section id='tests'>
## --answers--
```yml
question:
text: |
What kind of estimator/model does TensorFlow recommend using for classification?
answers:
- |
`LinearClassifier`
- |
`DNNClassifier`
- |
`BoostedTreesClassifier`
solution: 2
```
`LinearClassifier`
---
`DNNClassifier`
---
`BoostedTreesClassifier`
## --video-solution--
2
</section>

View File

@ -5,27 +5,25 @@ challengeType: 11
videoId: qFF7ZQNvK9E
---
## Description
# --question--
<section id='description'>
</section>
## --text--
## Tests
What is classification?
<section id='tests'>
## --answers--
```yml
question:
text: |
What is classification?
answers:
- |
The process of separating data points into different classes.
- |
Predicting a numeric value or forecast based on independent and dependent variables.
- |
None of the above.
solution: 1
```
The process of separating data points into different classes.
---
Predicting a numeric value or forecast based on independent and dependent variables.
---
None of the above.
## --video-solution--
1
</section>

View File

@ -5,31 +5,33 @@ challengeType: 11
videoId: 8sqIaHc9Cz4
---
## Description
# --question--
<section id='description'>
</section>
## --text--
## Tests
Which of the following steps is **not** part of the K-Means algorithm?
<section id='tests'>
## --answers--
```yml
question:
text: |
Which of the following steps is **not** part of the K-Means algorithm?
answers:
- |
Randomly pick K points to place K centeroids.
- |
Assign each K point to the closest K centeroid.
- |
Move each K centeroid into the middle of all of their data points.
- |
Shuffle the K points so they're redistributed randomly.
- |
Reassign each K point to the closest K centeroid.
solution: 4
```
Randomly pick K points to place K centeroids.
---
Assign each K point to the closest K centeroid.
---
Move each K centeroid into the middle of all of their data points.
---
Shuffle the K points so they're redistributed randomly.
---
Reassign each K point to the closest K centeroid.
## --video-solution--
4
</section>

View File

@ -5,27 +5,25 @@ challengeType: 11
videoId: IZg24y4wEPY
---
## Description
# --question--
<section id='description'>
</section>
## --text--
## Tests
What makes a Hidden Markov model different than linear regression or classification?
<section id='tests'>
## --answers--
```yml
question:
text: |
What makes a Hidden Markov model different than linear regression or classification?
answers:
- |
It uses probability distributions to predict future events or states.
- |
It analyzes the relationship between independent and dependent variables to make predictions.
- |
It separates data points into separate categories.
solution: 1
```
It uses probability distributions to predict future events or states.
---
It analyzes the relationship between independent and dependent variables to make predictions.
---
It separates data points into separate categories.
## --video-solution--
1
</section>

View File

@ -5,27 +5,25 @@ challengeType: 11
videoId: _cEwvqVoBhI
---
## Description
# --question--
<section id='description'>
</section>
## --text--
## Tests
What are epochs?
<section id='tests'>
## --answers--
```yml
question:
text: |
What are epochs?
answers:
- |
The number of times the model will see the same data.
- |
A type of graph.
- |
The number of elements you feed to the model at once.
solution: 1
```
The number of times the model will see the same data.
---
A type of graph.
---
The number of elements you feed to the model at once.
## --video-solution--
1
</section>

View File

@ -5,27 +5,25 @@ challengeType: 11
videoId: wz9J1slsi7I
---
## Description
# --question--
<section id='description'>
</section>
## --text--
## Tests
What is categorical data?
<section id='tests'>
## --answers--
```yml
question:
text: |
What is categorical data?
answers:
- |
Another term for one-hot encoding.
- |
Any data that is not numeric.
- |
Any data that is represented numerically.
solution: 2
```
Another term for one-hot encoding.
---
Any data that is not numeric.
---
Any data that is represented numerically.
## --video-solution--
2
</section>

View File

@ -5,27 +5,25 @@ challengeType: 11
videoId: fYAYvLUawnc
---
## Description
# --question--
<section id='description'>
</section>
## --text--
## Tests
What TensorFlow module should you import to implement `.HiddenMarkovModel()`?
<section id='tests'>
## --answers--
```yml
question:
text: |
What TensorFlow module should you import to implement `.HiddenMarkovModel()`?
answers:
- |
`tensorflow.keras`
- |
`tensorflow_gpu`
- |
`tensorflow_probability`
solution: 3
```
`tensorflow.keras`
---
`tensorflow_gpu`
---
`tensorflow_probability`
## --video-solution--
3
</section>

View File

@ -5,27 +5,25 @@ challengeType: 11
videoId: u85IOSsJsPI
---
## Description
# --question--
<section id='description'>
</section>
## --text--
## Tests
What does the pandas `.head()` function do?
<section id='tests'>
## --answers--
```yml
question:
text: |
What does the pandas `.head()` function do?
answers:
- |
Returns the number of entries in a data frame.
- |
Returns the number of columns in a data frame.
- |
By default, shows the first five rows or entries in a data frame.
solution: 3
```
Returns the number of entries in a data frame.
---
Returns the number of columns in a data frame.
---
By default, shows the first five rows or entries in a data frame.
## --video-solution--
3
</section>

View File

@ -5,31 +5,31 @@ challengeType: 11
videoId: u5lZURgcWnU
---
## Description
# --question--
<section id='description'>
</section>
## --text--
## Tests
Which type of analysis would be best suited for the following problem?:
<section id='tests'>
You have the average temperature in the month of March for the last 100 years. Using this data, you want to predict the average temperature in the month of March 5 years from now.
```yml
question:
text: |
Which type of analysis would be best suited for the following problem?:
## --answers--
You have the average temperature in the month of March for the last 100 years. Using this data, you want to predict the average temperature in the month of March 5 years from now.
answers:
- |
Multiple regression
- |
Correlation
- |
Decision tree
- |
Linear regression
solution: 4
```
Multiple regression
---
Correlation
---
Decision tree
---
Linear regression
## --video-solution--
4
</section>

View File

@ -5,49 +5,47 @@ challengeType: 11
videoId: kfv0K8MtkIc
---
## Description
<section id='description'>
</section>
# --question--
## Tests
<section id='tests'>
## --text--
```yml
question:
text: |
Fill in the blanks below to complete the architecture for a convolutional neural network:
Fill in the blanks below to complete the architecture for a convolutional neural network:
```py
model = models.__A__()
model.add(layers.__B__(32, (3, 3), activation='relu', input_shape=(32, 32, 3)))
model.add(layers.__C__(2, 2))
model.add(layers.__B__(64, (3, 3), activation='relu'))
model.add(layers.__C__(2, 2))
model.add(layers.__B__(32, (3, 3), activation='relu'))
model.add(layers.__C__(2, 2))
```
answers:
- |
A: `Sequential`
B: `add`
C: `Wrapper`
- |
A: `keras`
B: `Cropping2D`
C: `AlphaDropout`
- |
A: `Sequential`
B: `Conv2D`
C: `MaxPooling2D`
solution: 3
```py
model = models.__A__()
model.add(layers.__B__(32, (3, 3), activation='relu', input_shape=(32, 32, 3)))
model.add(layers.__C__(2, 2))
model.add(layers.__B__(64, (3, 3), activation='relu'))
model.add(layers.__C__(2, 2))
model.add(layers.__B__(32, (3, 3), activation='relu'))
model.add(layers.__C__(2, 2))
```
</section>
## --answers--
A: `Sequential`
B: `add`
C: `Wrapper`
---
A: `keras`
B: `Cropping2D`
C: `AlphaDropout`
---
A: `Sequential`
B: `Conv2D`
C: `MaxPooling2D`
## --video-solution--
3

View File

@ -5,27 +5,25 @@ challengeType: 11
videoId: KwL1qTR5MT8
---
## Description
# --question--
<section id='description'>
</section>
## --text--
## Tests
Which statement below is **false**?
<section id='tests'>
## --answers--
```yml
question:
text: |
Which statement below is **false**?
answers:
- |
Neural networks are modeled after the way the human brain works.
- |
Computer programs that play tic-tac-toe or chess against human players are examples of simple artificial intelligence.
- |
Machine learning is a subset of artificial intelligence.
solution: 1
```
Neural networks are modeled after the way the human brain works.
---
Computer programs that play tic-tac-toe or chess against human players are examples of simple artificial intelligence.
---
Machine learning is a subset of artificial intelligence.
## --video-solution--
1
</section>

View File

@ -5,31 +5,33 @@ challengeType: 11
videoId: r9hRyGGjOgQ
---
## Description
# --question--
<section id='description'>
</section>
## --text--
## Tests
Which of the following is **not** a type of tensor?
<section id='tests'>
## --answers--
```yml
question:
text: |
Which of the following is **not** a type of tensor?
answers:
- |
Variable
- |
Flowing
- |
Placeholder
- |
SparseTensor
- |
Constant
solution: 2
```
Variable
---
Flowing
---
Placeholder
---
SparseTensor
---
Constant
## --video-solution--
2
</section>

View File

@ -5,59 +5,57 @@ challengeType: 11
videoId: 32WBFS7lfsw
---
## Description
<section id='description'>
</section>
# --question--
## Tests
<section id='tests'>
## --text--
```yml
question:
text: |
Fill in the blanks below to complete the `build_model` function:
Fill in the blanks below to complete the `build_model` function:
```py
def build_mode(vocab_size, embedding_dim, rnn_units, batch_size):
model = tf.keras.Sequential([
tf.keras.layers.Embedding(vocab_size,
embedding_dim,
batch_input_shape=[batch_size, None]),
tf.keras.layers.__A__(rnn_units,
return_sequences=__B__,
recurrent_initializer='glorot_uniform),
tf.keras.layers.Dense(__C__)
])
__D__
```
answers:
- |
A: `ELU`
B: `True`
C: `vocab_size`
D: `return model`
- |
A: `LSTM`
B: `False`
C: `batch_size`
D: `return model`
- |
A: `LSTM`
B: `True`
C: `vocab_size`
D: `return model`
solution: 3
```py
def build_mode(vocab_size, embedding_dim, rnn_units, batch_size):
model = tf.keras.Sequential([
tf.keras.layers.Embedding(vocab_size,
embedding_dim,
batch_input_shape=[batch_size, None]),
tf.keras.layers.__A__(rnn_units,
return_sequences=__B__,
recurrent_initializer='glorot_uniform),
tf.keras.layers.Dense(__C__)
])
__D__
```
</section>
## --answers--
A: `ELU`
B: `True`
C: `vocab_size`
D: `return model`
---
A: `LSTM`
B: `False`
C: `batch_size`
D: `return model`
---
A: `LSTM`
B: `True`
C: `vocab_size`
D: `return model`
## --video-solution--
3

View File

@ -5,37 +5,35 @@ challengeType: 11
videoId: j5xsxjq_Xk8
---
## Description
<section id='description'>
</section>
# --question--
## Tests
<section id='tests'>
## --text--
```yml
question:
text: |
Fill in the blanks below to create the training examples for the RNN:
Fill in the blanks below to create the training examples for the RNN:
```py
char_dataset = tf.data.__A__.__B__(text_as_int)
```
answers:
- |
A: `DataSet`
B: `from_tensor_slices`
- |
A: `data`
B: `from_tensors`
- |
A: `DataSet`
B: `from_generator`
solution: 1
```py
char_dataset = tf.data.__A__.__B__(text_as_int)
```
</section>
## --answers--
A: `DataSet`
B: `from_tensor_slices`
---
A: `data`
B: `from_tensors`
---
A: `DataSet`
B: `from_generator`
## --video-solution--
1

View File

@ -5,27 +5,25 @@ challengeType: 11
videoId: WO1hINnBj20
---
## Description
# --question--
<section id='description'>
</section>
## --text--
## Tests
Before you make a prediction with your own review, you should...:
<section id='tests'>
## --answers--
```yml
question:
text: |
Before you make a prediction with your own review, you should...:
answers:
- |
decode the training dataset and compare the results to the test data.
- |
use the encodings from the training dataset to encode your review.
- |
assign random values between 0 and the maximum number of vocabulary in your dataset to each word in your review.
solution: 2
```
decode the training dataset and compare the results to the test data.
---
use the encodings from the training dataset to encode your review.
---
assign random values between 0 and the maximum number of vocabulary in your dataset to each word in your review.
## --video-solution--
2
</section>

View File

@ -5,27 +5,25 @@ challengeType: 11
videoId: mUU9YXOFbZg
---
## Description
# --question--
<section id='description'>
</section>
## --text--
## Tests
Word embeddings are...:
<section id='tests'>
## --answers--
```yml
question:
text: |
Word embeddings are...:
answers:
- |
an unordered group of encoded words that describes the frequency of words in a given document.
- |
a group of encoded words that preserves the original order of the words in a given document.
- |
a vectorized representation of words in a given document that places words with similar meanings near each other.
solution: 3
```
an unordered group of encoded words that describes the frequency of words in a given document.
---
a group of encoded words that preserves the original order of the words in a given document.
---
a vectorized representation of words in a given document that places words with similar meanings near each other.
## --video-solution--
3
</section>

View File

@ -5,29 +5,29 @@ challengeType: 11
videoId: bX5681NPOcA
---
## Description
# --question--
<section id='description'>
</section>
## --text--
## Tests
What is true about Recurrent Neural Networks?
<section id='tests'>
## --answers--
```yml
question:
text: |
What is true about Recurrent Neural Networks?
answers:
- |
1: They are a type of feed-forward neural network.
- |
2: They maintain an internal memory/state of the input that was already processed.
- |
3: RNN's contain a loop and process one piece of input at a time.
- |
4: Both 2 and 3.
solution: 4
```
1: They are a type of feed-forward neural network.
---
2: They maintain an internal memory/state of the input that was already processed.
---
3: RNN's contain a loop and process one piece of input at a time.
---
4: Both 2 and 3.
## --video-solution--
4
</section>

View File

@ -5,47 +5,45 @@ challengeType: 11
videoId: lYeLtu8Nq7c
---
## Description
<section id='description'>
</section>
# --question--
## Tests
<section id='tests'>
## --text--
```yml
question:
text: |
Fill in the blanks below to create the model for the RNN:
Fill in the blanks below to create the model for the RNN:
```py
model = __A__.keras.Sequential([
__A__.keras.layers.__B__(88584, 32),
__A__.keras.layers.__C__(32),
__A__.keras.layers.DENSE(1, activation='sigmoid')
])
```
answers:
- |
A: `tensor_flow`
B: `embedding`
C: `LSTM`
- |
A: `tf`
B: `Embedding`
C: `AlphaDropout`
- |
A: `tf`
B: `Embedding`
C: `LSTM`
solution: 3
```py
model = __A__.keras.Sequential([
__A__.keras.layers.__B__(88584, 32),
__A__.keras.layers.__C__(32),
__A__.keras.layers.DENSE(1, activation='sigmoid')
])
```
</section>
## --answers--
A: `tensor_flow`
B: `embedding`
C: `LSTM`
---
A: `tf`
B: `Embedding`
C: `AlphaDropout`
---
A: `tf`
B: `Embedding`
C: `LSTM`
## --video-solution--
3

View File

@ -5,51 +5,49 @@ challengeType: 11
videoId: hEUiK7j9UI8
---
## Description
<section id='description'>
</section>
# --question--
## Tests
<section id='tests'>
## --text--
```yml
question:
text: |
Fill in the blanks below to save your model's checkpoints in the `./checkpoints` directory and call the latest checkpoint for training:
Fill in the blanks below to save your model's checkpoints in the `./checkpoints` directory and call the latest checkpoint for training:
```py
checkpoint_dir = __A__
checkpoint_prefix = os.path.join(checkpoint_dir, 'ckpt_{epoch}')
```py
checkpoint_dir = __A__
checkpoint_prefix = os.path.join(checkpoint_dir, 'ckpt_{epoch}')
checkpoint_callback = tf.keras.callbacks.__B__(
filepath=checkpoint_prefix,
save_weights_only=True
)
checkpoint_callback = tf.keras.callbacks.__B__(
filepath=checkpoint_prefix,
save_weights_only=True
)
history = model.fit(data, epochs=2, callbacks=[__C__])
```
answers:
- |
A: `'./training_checkpoints'`
B: `ModelCheckpoint`
C: `checkpoint_prefix`
- |
A: `'./checkpoints'`
B: `ModelCheckpoint`
C: `checkpoint_callback`
- |
A: `'./checkpoints'`
B: `BaseLogger`
C: `checkpoint_callback`
solution: 2
history = model.fit(data, epochs=2, callbacks=[__C__])
```
</section>
## --answers--
A: `'./training_checkpoints'`
B: `ModelCheckpoint`
C: `checkpoint_prefix`
---
A: `'./checkpoints'`
B: `ModelCheckpoint`
C: `checkpoint_callback`
---
A: `'./checkpoints'`
B: `BaseLogger`
C: `checkpoint_callback`
## --video-solution--
2

View File

@ -5,27 +5,25 @@ challengeType: 11
videoId: ZyCaF5S-lKg
---
## Description
# --question--
<section id='description'>
</section>
## --text--
## Tests
Natural Language Processing is a branch of artificial intelligence that...:
<section id='tests'>
## --answers--
```yml
question:
text: |
Natural Language Processing is a branch of artificial intelligence that...:
answers:
- |
deals with how computers understand and process natural/human languages.
- |
translates image data into natural/human languages.
- |
is focused on translating computer languages into natural/human languages.
solution: 1
```
deals with how computers understand and process natural/human languages.
---
translates image data into natural/human languages.
---
is focused on translating computer languages into natural/human languages.
## --video-solution--
1
</section>

View File

@ -5,27 +5,25 @@ challengeType: 11
videoId: S45tqW6BqRs
---
## Description
# --question--
<section id='description'>
</section>
## --text--
## Tests
Which activation function switches values between -1 and 1?
<section id='tests'>
## --answers--
```yml
question:
text: |
Which activation function switches values between -1 and 1?
answers:
- |
ReLU (Rectified Linear Unit)
- |
Tanh (Hyperbolic Tangent)
- |
Sigmoid
solution: 2
```
ReLU (Rectified Linear Unit)
---
Tanh (Hyperbolic Tangent)
---
Sigmoid
## --video-solution--
2
</section>

View File

@ -5,47 +5,45 @@ challengeType: 11
videoId: K8bz1bmOCTw
---
## Description
<section id='description'>
</section>
# --question--
## Tests
<section id='tests'>
## --text--
```yml
question:
text: |
Fill in the blanks below to build a sequential model of dense layers:
Fill in the blanks below to build a sequential model of dense layers:
```py
model = __A__.__B__([
__A__.layers.Flatten(input_shape=(28, 28)),
__A__.layers.__C__(128, activation='relu'),
__A__.layers.__C__(10, activation='softmax')
])
```
answers:
- |
A: `keras`
B: `Sequential`
C: `Dense`
- |
A: `tf`
B: `Sequential`
C: `Categorical`
- |
A: `keras`
B: `sequential`
C: `dense`
solution: 1
```py
model = __A__.__B__([
__A__.layers.Flatten(input_shape=(28, 28)),
__A__.layers.__C__(128, activation='relu'),
__A__.layers.__C__(10, activation='softmax')
])
```
</section>
## --answers--
A: `keras`
B: `Sequential`
C: `Dense`
---
A: `tf`
B: `Sequential`
C: `Categorical`
---
A: `keras`
B: `sequential`
C: `dense`
## --video-solution--
1

View File

@ -5,27 +5,25 @@ challengeType: 11
videoId: hdOtRPQe1o4
---
## Description
# --question--
<section id='description'>
</section>
## --text--
## Tests
What is an optimizer function?
<section id='tests'>
## --answers--
```yml
question:
text: |
What is an optimizer function?
answers:
- |
A function that increases the accuracy of a model's predictions.
- |
A function that implements the gradient descent and backpropagation algorithms for you.
- |
A function that reduces the time a model needs to train.
solution: 2
```
A function that increases the accuracy of a model's predictions.
---
A function that implements the gradient descent and backpropagation algorithms for you.
---
A function that reduces the time a model needs to train.
## --video-solution--
2
</section>

View File

@ -5,27 +5,25 @@ challengeType: 11
videoId: uisdfrNrZW4
---
## Description
# --question--
<section id='description'>
</section>
## --text--
## Tests
A densely connected neural network is one in which...:
<section id='tests'>
## --answers--
```yml
question:
text: |
A densely connected neural network is one in which...:
answers:
- |
all the neurons in the current layer are connected to one neuron in the previous layer.
- |
all the neurons in each layer are connected randomly.
- |
all the neurons in the current layer are connected to every neuron in the previous layer.
solution: 3
```
all the neurons in the current layer are connected to one neuron in the previous layer.
---
all the neurons in each layer are connected randomly.
---
all the neurons in the current layer are connected to every neuron in the previous layer.
## --video-solution--
3
</section>

View File

@ -5,43 +5,41 @@ challengeType: 11
videoId: RBBSNta234s
---
## Description
<section id='description'>
</section>
# --question--
## Tests
<section id='tests'>
## --text--
```yml
question:
text: |
Fill in the blanks to complete the following Q-Learning equation:
Fill in the blanks to complete the following Q-Learning equation:
```py
Q[__A__, __B__] = Q[__A__, __B__] + LEARNING_RATE * (reward + GAMMA * np.max(Q[__C__, :]) - Q[__A__, __B__])
```
answers:
- |
A: `state`
B: `action`
C: `next_state`
- |
A: `state`
B: `action`
C: `prev_state`
- |
A: `state`
B: `reaction`
C: `next_state`
solution: 1
```py
Q[__A__, __B__] = Q[__A__, __B__] + LEARNING_RATE * (reward + GAMMA * np.max(Q[__C__, :]) - Q[__A__, __B__])
```
</section>
## --answers--
A: `state`
B: `action`
C: `next_state`
---
A: `state`
B: `action`
C: `prev_state`
---
A: `state`
B: `reaction`
C: `next_state`
## --video-solution--
1

View File

@ -5,25 +5,21 @@ challengeType: 11
videoId: DX7hJuaUZ7o
---
## Description
# --question--
<section id='description'>
</section>
## --text--
## Tests
What can happen if the agent does not have a good balance of taking random actions and using learned actions?
<section id='tests'>
## --answers--
```yml
question:
text: |
What can happen if the agent does not have a good balance of taking random actions and using learned actions?
answers:
- |
The agent will always try to minimize its reward for the current state/action, leading to local minima.
- |
The agent will always try to maximize its reward for the current state/action, leading to local maxima.
solution: 2
```
The agent will always try to minimize its reward for the current state/action, leading to local minima.
---
The agent will always try to maximize its reward for the current state/action, leading to local maxima.
## --video-solution--
2
</section>

View File

@ -5,27 +5,25 @@ challengeType: 11
videoId: Cf7DSU0gVb4
---
## Description
# --question--
<section id='description'>
</section>
## --text--
## Tests
The key components of reinforcement learning are...
<section id='tests'>
## --answers--
```yml
question:
text: |
The key components of reinforcement learning are...
answers:
- |
environment, representative, state, reaction, and reward.
- |
environment, agent, state, action, and reward.
- |
habitat, agent, state, action, and punishment.
solution: 2
```
environment, representative, state, reaction, and reward.
---
environment, agent, state, action, and reward.
---
habitat, agent, state, action, and punishment.
## --video-solution--
2
</section>