Sprint Challenge
Overview
This sprint challenge will test your understanding of major neural network architectures covered in this sprint. You'll explore some of the cutting edge of Deep Learning by working with recurrent neural networks (RNNs), long short-term memory (LSTMs), convolutional neural networks (CNNs), and Autoencoders.
The challenge consists of two main parts:
- LSTM Classification Model: Train an LSTM network to classify Reuters news articles into topics.
- Pre-trained CNN for Object Detection: Use ResNet50v2 to detect frogs in images.
Important Notes
These approaches can be computationally intensive. All problems are designed to run within 5-10 minutes in environments like AWS SageMaker, Colab, or comparable setups. If something is running longer, double check your approach.
Study Guide
What You Need to Know
To successfully complete this Sprint Challenge, you should be familiar with:
- LSTM architecture and implementation in Keras
- Multi-class classification with neural networks
- Pre-trained CNN models, particularly ResNet50v2
- Image preprocessing techniques for neural networks
- Transfer learning concepts
Key Concepts to Review
- Text preprocessing for LSTM models
- Sequence padding and embedding layers
- How to use pre-trained models for inference
- Interpretation of neural network outputs
- Model evaluation for classification tasks
Challenge Setup
The challenge uses two datasets:
- Reuters news articles dataset for the LSTM classification task
- A collection of images for the CNN object detection task
Access the Challenge Notebook
You can access the Sprint Challenge notebook here:
Before submitting your notebook, follow these steps:
- Restart your notebook's Kernel
- Run all cells sequentially, from top to bottom
- Delete or comment out any gridsearch code
- For Part 2, comment out the code where you:
- Load the images
- Make the predictions
- Display any plots or images
- Verify that your notebook runs completely without errors
Requirements
Part 1: LSTM Classification Model
In this section, you will:
- Use Keras to fit a predictive model classifying Reuters news articles into topics
- Name your model as
model
- Use a single hidden layer
- Use
sparse_categorical_crossentropy
as your loss function - Use accuracy as your metric
- Set epochs=1 due to CodeGrade resource constraints
- Report your overall score and accuracy
Note: Focus on getting a running model, not on maximizing accuracy with extreme data size or epoch numbers.
Part 2: Pre-trained CNN for Image Classification
For this part, you will:
- Use a pre-trained ResNet50v2 model to detect frogs in images
- Instantiate the model and save it to a variable named
resnet_model
- Resize images to the appropriate dimensions for the model
- Apply proper preprocessing techniques
- Make predictions on each image to identify which ones contain frogs
- Decode the predictions (Note: ResNet50v2 labels frogs as "bullfrog", "tree frog", or "tailed frog")
Submission Requirements
Before submitting your completed notebook, ensure that you:
- Restart the kernel
- Run all cells sequentially, from top to bottom
- Check that all cells have executed without errors
- Remove or comment out any code that might cause CodeGrade to crash (gridsearch, image loading, etc.)
- Verify that your notebook runs completely before submission