What is transfer learning?
Ordinarily, training an image classification model can take several days, but transfer learning is a technique that takes a model already trained for a related task and uses it as the starting point to create a new model. Usually this takes less than an hour. (This process is sometimes also called "fine-tuning" the model.)
Transfer learning can be done in two ways:
- Last layers-only retraining: This approach retrains only the last few layers of the model, where the final classification occurs. This is fast and it can be done with a small dataset.
- Full model retraining: This approach retrains each layer of the neural network using the new dataset. It can result in a model that is more accurate, but it takes more time, and you must retrain using a dataset of significant sample size to avoid overfitting the model.
Transfer learning is most effective when the features learned in the pre-trained model are general, not highly specialized. For example, a pre-trained model that can recognize household objects might be re-trained to recognize new office supplies, but a model pre-trained to recognize different dog breeds might not.
This tutorial shows you how to retrain an image classification model to recognize a new set of classes. You'll use a technique called transfer learning to retrain an existing model and then compile it to run on an Edge TPU device—you can use the retrained model with either the Coral Dev Board or the Coral USB Accelerator.
Specifically, this tutorial shows you how to retrain a quantized MobileNet V1 model to recognize different types of flowers (adopted from TensorFlow's docs). But you can reuse these procedures with your own image dataset, and with a different pre-trained model.
Tip: If you want a shortcut to train an image classification model, try Cloud AutoML Vision. It's a web-based tool that allows you to train a model with your own images, optimize it, and then export it for the Edge TPU.
You can Edge TPU devices from Google global distributor: Gravitylink--https://store.gravitylink.com/global
评论
发表评论