Tensorflow Allocation Memory: Allocation of 38535168 exceeds 10% of system memory

前端 未结 6 1207
盖世英雄少女心
盖世英雄少女心 2020-12-08 04:45

Using ResNet50 pre-trained Weights I am trying to build a classifier. The code base is fully implemented in Keras high-level Tensorflow API. The complete code is posted in t

6条回答
  •  甜味超标
    2020-12-08 05:47

    I was having the same problem, and i concluded that there are two factors to be considered when see this error: 1- batch_size ==> because this responsible for the data size to be processed for each epoch 2- image_size ==> the higher image dimensions (image size), more data to be processed

    So for these two factors, the RAM cannot handle all of required data.

    To solve the problem I tried two cases: The first change batch_size form 32 to 3 or 2 The second reduce image_size from (608,608) to (416,416)

提交回复
热议问题