Skip to Content
TensorFlow 2 Pocket Reference
book

TensorFlow 2 Pocket Reference

by KC Tung
July 2021
Intermediate to advanced content levelIntermediate to advanced
253 pages
5h 1m
English
O'Reilly Media, Inc.
Content preview from TensorFlow 2 Pocket Reference

Chapter 4. Reusable Model Elements

Developing an ML model can be a daunting task. Besides the data engineering aspect of the task, you also need to understand how to build the model. In the early days of ML, tree-based models (such as random forests) were king for applying straight-up classification or regression tasks to tabular datasets, and model architecture was determined by parameters related to model initialization. These parameters, known as hyperparameters, include the number of decision trees in a forest and the number of features considered by each tree when splitting a node. However, it is not straightforward to convert some types of data, such as images or text, into tabular form: images may have different dimensions, and texts vary in length. That’s why deep learning has become the de facto standard model architecture for image and text classification.

As deep-learning architecture gains popularity, a community has grown around it. Creators have built and tested different model structures for academic and Kaggle challenges. Many have made their models open source so that they are available for transfer learning—anyone can use them for their own purposes.

For example, ResNet is an image classification model trained on the ImageNet dataset, which is about 150GB in size and contains more than a million images. The labels in this data include plants, geological formations, natural objects, sports, persons, and animals. So how can you reuse the ResNet model to classify ...

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.
Start your free trial

You might also like

The TensorFlow Workshop

The TensorFlow Workshop

Matthew Moocarme, Abhranshu Bagchi, Anthony So, Anthony Maddalone

Publisher Resources

ISBN: 9781492089179Errata PageSupplemental Content