Wolfram Language

Use Pre-trained Models to Visualize Features

A pre-trained neural net can be modified to become a feature extractor. Feature extraction is typically used for transfer learning, to define a semantic distance or to visualize a particular dataset. This example demonstrate how to use a pre-trained model from the Wolfram Neural Net Repository to extract features and visualize datasets in feature space.

Create an image feature extractor from a pre-trained model.

Load an image classifier.

Extract the first 22 out of 24 layers.

The resulting net transforms an image into 2048 numeric values. These values are semantically rich. Try this extractor on an image.

Use the extractor inside the function FeatureSpacePlot to visualize a dataset of images.

Some models are directly meant to be used as feature extractors. Create a 2D visualization of words using a GloVe feature extractor.

Related Examples

de es fr ja pt-br zh