How can I use the example Transfer Learning Using Alexnet with Vgg16?

4 ビュー (過去 30 日間)
Claudio Mor
Claudio Mor 2018 年 11 月 12 日
回答済み: xu lu 2019 年 1 月 4 日
I tried to use 'Transfer Learning Using AlexNet' with Vgg16 but it failed to start the Training iterations. How can I use this example with Vgg16?
[netTransfer, info] = trainNetwork(augimdsTrain,layers,options);
Error using trainNetwork (line 150) GPU out of memory. Try reducing 'MiniBatchSize' using the trainingOptions function.
*Error in TL_CM_V3_Test_IM_VGG16 (line 68) [netTransfer, info] = trainNetwork(augimdsTrain,layers,options);
Caused by: Error using .* Out of memory on device. To view more detail about available memory on the GPU, use 'gpuDevice()'. If the problem persists, reset the GPU by calling 'gpuDevice(1)'.*
My gpu is CUDADevice with properties:
Name: 'GeForce 930MX'
Index: 1
ComputeCapability: '5.0'

採用された回答

Johannes Bergstrom
Johannes Bergstrom 2018 年 11 月 12 日
Vgg16 requires a lot of GPU memory and you don't have very much of it. The error message says "Try reducing 'MiniBatchSize' using the trainingOptions function." Did you try that? Otherwise, I would recommend using a network that uses less memory, for example, GoogLeNet or SqueezeNet.
You can use any pretriained network available in MATLAB for transfer learning in this example: https://www.mathworks.com/help/deeplearning/examples/train-deep-learning-network-to-classify-new-images.html
For a list of pretrained networks, see https://www.mathworks.com/help/deeplearning/ug/pretrained-convolutional-neural-networks.html
  1 件のコメント
Claudio Mor
Claudio Mor 2018 年 11 月 12 日
Thank you! I tried setting the minimum 'MiniBatchSize'=1 but without success. Unfortunately, I need to use Vgg16 or a custom (shallower) miniVgg for my project; I'm going to use a Nvidia Gtx1080 8Gb, can this be enough?

サインインしてコメントする。

その他の回答 (1 件)

xu lu
xu lu 2019 年 1 月 4 日
I have tried many times but failed to install Vgg16 successfully. The installation always stops when the download reaches 18%.Can you help me?

カテゴリ

Help Center および File ExchangeImage Data Workflows についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by