Skip to Content
Python迁移学习
book

Python迁移学习

by Posts & Telecom Press, Dipanjan Sarkar, Raghav Bali, Tamoghna Ghosh
May 2024
Intermediate to advanced
373 pages
6h 6m
Chinese
Packt Publishing
Content preview from Python迁移学习

第5章 释放迁移学习的威力

在前面的章节中,我们介绍了围绕迁移学习的主要概念。迁移学习的关键思想是在各种各样的任务中利用最新的预训练深度学习模型来得到更优秀的结果,而非从零开始构建你自己的深度学习模型和架构。在本章中,我们将获得关于使用迁移学习构建深度学习模型更实际的观点,并将其运用于一个现实世界的问题中。我们将构建各种使用或不使用迁移学习的深度学习模型,并分析它们的架构和比较其性能。本章内容主要涉及以下几个主要部分。

  • 迁移学习的必要性。
  • 从零开始构建卷积神经网络模型,即CNN模型:
    • 构建一个基本的CNN模型;
    • 使用正则化提升CNN模型的性能;
    • 使用图片增强提升CNN模型的性能。
  • 使用预训练的CNN模型来利用迁移学习:
    • 使用一个预训练模型作为特征提取器;
    • 使用图片增强提升预训练模型的性能;
    • 使用微调提升预训练模型的性能。
  • 模型性能评估。

Francois Chollet不仅创建了令人惊叹的深度学习框架Keras,同时还在他的著作DeepLearning With Python中讨论了迁移学习是如何有效地解决现实世界问题的。在本章中,我们将以此为灵感来描述迁移学习的真正力量。本章中的代码可以在异步社区网站获取。

在第4章中,我们已经简要讨论了迁移学习的优势。使用迁移学习,我们将获得一些好处,例如提高基线性能和缩短整体模型开发和训练时间,并且与从零开始构建深度学习模型相比,我们还得到了整体的提升和更优的模型性能。这里需要记住的一个重点是:迁移学习作为一个领域,在深度学习之前就已经存在,它也可以应用于不需要深度学习的领域或问题。

现在我们来考虑一个现实世界的问题,我们将在本章中使用这个问题来说明不同的深度学习模型,并在同一问题中使用迁移学习。深度学习的一个关键要求是需要大量的数据和样本来建立健壮的深度学习模型。这背后的思想是模型可以自动地从大量的样本中学习特征。但是当我们没有足够的训练样本,并且需要解决的问题仍然是一个相对复杂的问题时,我们应该怎么办呢?例如一个计算机视觉问题(如图像分类)使用传统的统计方法或 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

(Re)Value

(Re)Value

Adam Wallace
深度学习实战手册(R语言版)

深度学习实战手册(R语言版)

Posts & Telecom Press, PKS Prakash, Achyutuni Sri Krishna Rao
Python计算机视觉和自然语言处理

Python计算机视觉和自然语言处理

Posts & Telecom Press, Álvaro Morena Alberolaï, Gonzalo Molina Gallegoï, Unai Garay Maestreï
人工智能技术与大数据

人工智能技术与大数据

Posts & Telecom Press, Anand Deshpande, Manish Kumar

Publisher Resources

ISBN: 9781836205418