VGG-16 is a pretrained Convolutional Neural Network (CNN) that has been trained on approximately 1.2 million images from the ImageNet Dataset (http://image-net.org/index) by the Visual Geometry Group at University of Oxford (http://www.robots.ox.ac.uk/~vgg/research/very_deep/).
The model has 16 layers and can classify images into 1000 object categories (e.g. keyboard, mouse, coffee mug, pencil).
Opening the vgg16.mlpkginstall file from your operating system or from within MATLAB will initiate the installation process for the release you have.
This mlpkginstall file is functional for R2017a and beyond.
% Load the trained model
net = vgg16()
% See details of the architecture
% Read the image to classify
I = imread('peppers.png');
% Adjust size of the image
sz = net.Layers(1).InputSize
I = I(1:sz(1),1:sz(2),1:sz(3));
% Classify the image using VGG-16
label = classify(net, I);
% Show the image and the classification results
text(10, 20, char(label),'Color','white')
It is a perfectly tool to do Deep learning!
I get 41 layers !
So when I run the command: label = classify(net, I);
I get the error message: Can't reload '/Applications/MATLAB_R2017a.app/bin/maci64/libmwgpu.dylib'
My Matlab is up to date, and the network itself loads fine, does anyone know what this is and how to fix it?
Is there an update version that can work on a single GPU when training?
The VGG16 may need about 14 GB for a batch size of 128.
However, it only has about 8 to 12 GB memory size on a single GPU.
It runs out of memory when training. Any solution? Thank you.
View the winning live scripts from faculty and students who participated in the recent challenge.Learn more
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.