Perform Net Surgery for Transfer Learning

This example demonstrates how to use the suite of net surgery functions to create an image classification network starting from a pre-trained model.

Obtain a pre-trained model from the Wolfram Neural Net Repository.

Take the convolutional part of the net using NetTake.

Add a new classification layer using NetJoin and attach a new NetDecoder.

Add an ImageAugmentationLayer to perform data augmentation using NetPrepend and reattach the encoder.

Define a dataset.

Train the net, keeping the pre-trained weights fixed.

Evaluate the trained net on an unseen input.

Related Examples

de es fr ja ko pt-br zh