Why training stops showing error (out of memory) during implementing transfer learning with pre-trained network despite having a laptop of well configuration?

3 ビュー (過去 30 日間)
Trying to use trasnfer learning method for classsify images but I have failed to run. It always stop showing error: out of memory. I have faced the same problem when I have tried to build a large and complex cnn architecture from scratch. At first I have thought that too large dataset caused the problem.I have tried my model with only few images to test and even have tried to run in better configured pc than my laptop also, but I couln't get rid of the problem. Now I am facing the same issue while trying transfer learing. I do need both runinng a complex network from scratch and using pre-trained network.
I have follwed the documentation of transfer learning using the Prepare Network for Transfer Learning Using Deep Network Designer.
The details of images, choosen pre-trained methods and pc confuguration are:
images no: 60,000
class of image: 13
pre-trained network: DenseNet-201
laptop configuration: Ryzen 7, RAM 16GB, GPU NVIDIA GEFORCE RTX 3050
I am also attaching the Error msg showing and gpu details from gpuDevice:

採用された回答

Joss Knight
Joss Knight 2024 年 4 月 22 日
編集済み: Joss Knight 2024 年 4 月 22 日

You have a very small GPU I'm afraid. You need to lower your MiniBatchSize until it works. Also, set your ExecutionEnvironment to auto since you only have one GPU.

If this doesn't work your only option is to use a smaller network or a bigger GPU.

You could just train on the CPU of course, if you don't mind it taking longer. At least that will likely have plenty of memory, and the way GPUs tend to be throttled on laptops it probably won't be much slower.

  1 件のコメント
ZEBA
ZEBA 2024 年 4 月 24 日
@Joss Knight Thank you so much. Your suggestion has been worked. I am trully grateful. Thanks again !

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

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by