Custom Models, Layers, and Loss Functions with TensorFlow
Keep adding new skills with 10,000+ programs for $239 (usually $399). Save now.
Custom Models, Layers, and Loss Functions with TensorFlow
This course is part of TensorFlow: Advanced Techniques Specialization
Instructors: Laurence Moroney
44,287 already enrolled
Ask Coursera
1,108 reviews
Recommended experience
1,108 reviews
Recommended experience
Skills you'll gain
Tools you'll learn
Details to know
4 assignments
See how employees at top companies are mastering in-demand skills
Build your subject-matter expertise
- Learn new concepts from industry experts
- Gain a foundational understanding of a subject or tool
- Develop job-relevant skills with hands-on projects
- Earn a shareable career certificate
There are 5 modules in this course
In this course, you will:
β’ Compare Functional and Sequential APIs, discover new models you can build with the Functional API, and build a model that produces multiple outputs including a Siamese network. β’ Build custom loss functions (including the contrastive loss function used in a Siamese network) in order to measure how well a model is doing and help your neural network learn from training data. β’ Build off of existing standard layers to create custom layers for your models, customize a network layer with a lambda layer, understand the differences between them, learn what makes up a custom layer, and explore activation functions. β’ Build off of existing models to add custom functionality, learn how to define your own custom class instead of using the Functional or Sequential APIs, build models that can be inherited from the TensorFlow Model class, and build a residual network (ResNet) through defining a custom model class. The DeepLearning.AI TensorFlow: Advanced Techniques Specialization introduces the features of TensorFlow that provide learners with more control over their model architecture and tools that help them create and train advanced ML models. This Specialization is for early and mid-career software and machine learning engineers with a foundational understanding of TensorFlow who are looking to expand their knowledge and skill set by learning advanced TensorFlow features to build powerful models.
Compare how the Functional API differs from the Sequential API, and see how the Functional API gives you additional flexibility in designing models. Practice using the functional API and build a Siamese network!
What's included
11 videos7 readings1 assignment1 programming assignment1 app item3 ungraded labs
11 videosβ’Total 47 minutes
- A conversation with Andrew Ng: Overview of the specializationβ’6 minutes
- A conversation with Andrew Ng: Overview of course 1β’4 minutes
- Welcome to the courseβ’0 minutes
- Introduction to the Functional APIsβ’7 minutes
- Declaring and stacking layersβ’2 minutes
- Branching modelsβ’3 minutes
- Creating a Multi-Output modelβ’4 minutes
- Multi-Output code walkthroughβ’6 minutes
- Siamese network: a Multiple-Input model β’3 minutes
- Coding a Multi-Input Siamese networkβ’4 minutes
- Siamese network code walkthroughβ’9 minutes
7 readingsβ’Total 32 minutes
- Join the DeepLearning.AI Forum to ask questions, get support, or share amazing ideas!β’2 minutes
- Learn more about the Inception Model Architecture β’10 minutes
- Energy efficiency datasetβ’3 minutes
- References about the Siamese networkβ’3 minutes
- Reference "The distance between two vectors"β’3 minutes
- Lecture Notes Week 1β’1 minute
- (Optional) Downloading your Notebook and Refreshing your Workspaceβ’10 minutes
1 assignmentβ’Total 30 minutes
- Functional APIβ’30 minutes
1 programming assignmentβ’Total 180 minutes
- Multiple Output Models using Keras Functional APIβ’180 minutes
1 app itemβ’Total 1 minute
- Intake Surveyβ’1 minute
3 ungraded labsβ’Total 180 minutes
- Functional API Practiceβ’60 minutes
- Multi-outputβ’60 minutes
- Siamese networkβ’60 minutes
Loss functions help measure how well a model is doing, and are used to help a neural network learn from the training data. Learn how to build custom loss functions, including the contrastive loss function that is used in a Siamese network.
What's included
9 videos3 readings1 assignment1 programming assignment3 ungraded labs
9 videosβ’Total 23 minutes
- Welcome to Week 2β’1 minute
- Creating a custom loss functionβ’3 minutes
- Coding the Huber Loss functionβ’2 minutes
- Huber Loss code walkthroughβ’2 minutes
- Adding hyperparameters to custom loss functionsβ’3 minutes
- Turning loss functions into classesβ’2 minutes
- Huber Object Loss code walkthroughβ’4 minutes
- Contrastive Lossβ’3 minutes
- Coding Contrastive Lossβ’2 minutes
3 readingsβ’Total 9 minutes
- Huber Loss referenceβ’5 minutes
- Reference: Dimensionality reduction by Learning an Invariant Mappingβ’3 minutes
- Lecture Notes Week 2β’1 minute
1 assignmentβ’Total 30 minutes
- Custom Lossβ’30 minutes
1 programming assignmentβ’Total 180 minutes
- Creating a custom loss functionβ’180 minutes
3 ungraded labsβ’Total 180 minutes
- Huber Loss labβ’60 minutes
- Huber Loss objectβ’60 minutes
- Contrastive loss in the siamese networkβ’60 minutes
Custom layers give you the flexibility to implement models that use non-standard layers. Practice building off of existing standard layers to create custom layers for your models.
What's included
10 videos1 reading1 assignment1 programming assignment3 ungraded labs
10 videosβ’Total 31 minutes
- Intro custom layersβ’1 minute
- Introduction to Lambda Layersβ’2 minutes
- Custom Functions from Lambda Layersβ’2 minutes
- Exploring custom Relu with Lambda Layers β’4 minutes
- Architecture of a Custom Layerβ’2 minutes
- Coding your own custom Dense Layerβ’4 minutes
- Training a neural network with your Custom Layerβ’3 minutes
- Custom Layer code walkthroughβ’5 minutes
- Activating your Custom Layerβ’4 minutes
- Custom Layer with activation code walkthroughβ’4 minutes
1 readingβ’Total 1 minute
- Lecture Notes Week 3β’1 minute
1 assignmentβ’Total 30 minutes
- Custom Layersβ’30 minutes
1 programming assignmentβ’Total 180 minutes
- Implement a Quadratic Layerβ’180 minutes
3 ungraded labsβ’Total 180 minutes
- Lambda layerβ’60 minutes
- Custom dense layerβ’60 minutes
- Activation in a custom layerβ’60 minutes
You can build off of existing models to add custom functionality. This week, extend the TensorFlow Model Class to build a ResNet model!
What's included
7 videos3 readings1 assignment1 programming assignment2 ungraded labs
7 videosβ’Total 29 minutes
- Intro to custom modelsβ’1 minute
- Complex architectures with the Functional APIβ’3 minutes
- Coding a Wide and Deep modelβ’2 minutes
- Using the Model class to simplify architecturesβ’4 minutes
- Understanding Residual networksβ’7 minutes
- Coding a Residual network with the Model classβ’6 minutes
- ResNet code walkthroughβ’6 minutes
3 readingsβ’Total 13 minutes
- Residual networks lectures (optional)β’10 minutes
- Lecture Notes Week 4β’1 minute
- [IMPORTANT] Reminder about end of access to Lab Notebooksβ’2 minutes
1 assignmentβ’Total 30 minutes
- Custom Modelsβ’30 minutes
1 programming assignmentβ’Total 180 minutes
- Create a VGG networkβ’180 minutes
2 ungraded labsβ’Total 120 minutes
- Build a basic modelβ’60 minutes
- Build a ResNet modelβ’60 minutes
Custom callbacks allow you to customize what your model outputs or how it behaves during training. This week, implement a custom callback to stop training once the callback detects overfitting.
What's included
3 videos4 readings2 ungraded labs
3 videosβ’Total 20 minutes
- Built-in Callbacksβ’7 minutes
- Custom Callbacksβ’7 minutes
- Custom Callbacks code walkthroughβ’6 minutes
4 readingsβ’Total 31 minutes
- TensorBoard visualization toolkitβ’10 minutes
- Lecture Notes Week 5β’1 minute
- Referencesβ’10 minutes
- Acknowledgmentsβ’10 minutes
2 ungraded labsβ’Total 120 minutes
- Built-in Callbacksβ’60 minutes
- Custom Callbacksβ’60 minutes
Earn a career certificate
Add this credential to your LinkedIn profile, resume, or CV. Share it on social media and in your performance review.
Instructors
Offered by
Explore more from Machine Learning
- Status: Free TrialI
Imperial College London
Course
- Status: Free TrialD
DeepLearning.AI
Course
- Status: Free TrialD
DeepLearning.AI
Course
- Status: Free TrialD
DeepLearning.AI
Course
Why people choose Coursera for their career
Learner reviews
- 5 stars
88.63%
- 4 stars
9.01%
- 3 stars
1.62%
- 2 stars
0.63%
- 1 star
0.09%
Showing 3 of 1108
Reviewed on Jan 6, 2021
I started this course with the intention of learning the syntax needed to implement VAEs. This course satisfied that requirement perfectly! Thank you :)
Reviewed on Nov 24, 2020
Really great course, it teaches you all about the TF API and how to customize it for your needs, i thought only pytorch can make that as it's really pythonic, but i am a nieve noob what can i say.
Reviewed on Aug 22, 2023
Very interesting course! Here, I learned a lot of new things related to TensorFlow. The explanation of the material is easy to understand, and the exercises are also quite challenging.
Frequently asked questions
To access the course materials, assignments and to earn a Certificate, you will need to purchase the Certificate experience when you enroll in a course. You can try a Free Trial instead, or apply for Financial Aid. The course may offer 'Full Course, No Certificate' instead. This option lets you see all course materials, submit required assessments, and get a final grade. This also means that you will not be able to purchase a Certificate experience.
When you enroll in the course, you get access to all of the courses in the Specialization, and you earn a certificate when you complete the work. Your electronic Certificate will be added to your Accomplishments page - from there, you can print your Certificate or add it to your LinkedIn profile.
Yes. In select learning programs, you can apply for financial aid or a scholarship if you canβt afford the enrollment fee. If fin aid or scholarship is available for your learning program selection, youβll find a link to apply on the description page.
More questions
Financial aid available,
