Hands-On Transfer Learning with Python
Implement advanced deep learning and neural network models using TensorFlow and Keras
Dipanjan Sarkar
Raghav Bali
Tamoghna Ghosh
BIRMINGHAM - MUMBAI
Hands-On Transfer Learning with Python
Copyright 2018 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Commissioning Editor: Sunith Shetty
Acquisition Editor: Tushar Gupta
Content Development Editor: Unnati Guha
Technical Editor: Sayli Nikalje
Copy Editor: Safis Editing
Project Coordinator: Manthan Patel
Proofreader: Safis Editing
Indexer: Rekha Nair
Graphics: Jisha Chirayil
Production Coordinator: Shantanu Zagade
First published: August 2018
Production reference: 1300818
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78883-130-7
www.packtpub.com
This book wouldn't have been possible without several people who made this from a mere concept into reality. I would like to thank my parents, Digbijoy and Sampa, my partner, Durba, my pets, family, and friends for supporting me constantly in my endeavors. A big thank you to the entire team at Packt especially Tushar, Sayli, and Unnati for working tirelessly and supporting us throughout our journey. Also thanks to Matthew Mayo for gracing our book with his foreword and doing great things with KDnuggets.
Thanks to Adrian Rosebrock and PyImageSearch for some excellent visuals and content around pretrained models for computer vision, Federico Baldassarre, Diego Gonzalez-Morin, Lucas Rodes-Guirao, and Emil Wallner for some excellent strategies and implementations for image colorization, Anurag Mishra for giving tips for build an efficient image captioning model, Franois Chollet for building Keras and writing some very useful and engaging content on transfer learning and to the entire Python AI eco-system for helping the community democratize deep learning and artificial intelligence for everyone.
Finally, I would like to thank my managers and mentors Gopalan, Sanjeev, and Nagendra and all my friends and colleagues at Intel for encouraging me and giving me the opportunity to explore new domains in the world of AI. Shoutout also to the folks from Springboard, especially Srdjan Santic for not just giving me an opportunity to learn and interact with some amazing people but also for the passion, zeal, and vision of educating more people on Data Science and AI. Towards Data Science and Ludovic Benistant thanks for helping me learn and share more about AI to the rest of the world and helping me explore cutting-edge research and work in these domains. Last but not the least, I owe a ton of gratitude to my co-authors Raghav and Tamoghna and our reviewer Nitin Panwar for embarking on this journey with me and without whom this book wouldn't have been possible!
Dipanjan Sarkar
I would like to take this opportunity to express gratitude to my parents, Sunil and Neeru, my wife, Swati, my brother, Rajan, family, teachers, friends, colleagues, and mentors who have encouraged, supported and taught me over the years. I would also like to thank my co-authors and good friends Dipanjan Sarkar and Tamoghna Ghosh, for taking me along on this amazing journey. A big thanks to my managers and mentors Vineet, Ravi, and Vamsi along with all my teammates at Optum for their support and encouragement to explore new domains in the Data Science world.
I would like to thank Tushar Gupta, Aaryaman Singh, Sayli Nikalje, Unnati Guha, and Packt for the opportunity and their support throughout this journey. This book wouldn't have been complete without Nitin Panwar's insightful feedback and suggestions. Last but not the least, special thanks to Franois Chollet for Keras, the Python ecosystem and community, fellow authors and researchers who are striving every day to bring these amazing technologies and tools at our fingertips.
Raghav Bali
I would like to thank entire Packt team for giving me this unique opportunity and also guiding me throughout the journey. For this book my co-authors here acted as my mentor as well. They helped me with their insightful suggestions and guidance. Thanks to Nitin for patiently reviewing this book and providing great feedback. I would like to thank my wife Doyel, my son Anurag, and my parents for being a constant source of inspiration for me and tolerating me for working extended hours. Also, I am grateful to my Intel managers for their encouragement and support.
Tamoghna Ghosh
mapt.io
Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.
Why subscribe?
Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals
Improve your learning with Skill Plans built especially for you
Get a free eBook or video every month
Mapt is fully searchable
Copy and paste, print, and bookmark content
PacktPub.com
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at service@packtpub.com for more details.
At www.PacktPub.com , you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.
Foreword
Chances are you are familiar with the recent and seemingly endless machine learning innovations, but do you know about what goes into training a machine learning model? Generally, a given machine learning model is trained on specific data for a particular task. This training process can be exceptionally resource and time-consuming, and since the resulting models are task-specific, the maximum potential of the resulting model is not realized.
Next page