Tensorflow: ran out of memory trying to allocate 3.90GiB. The caller indicates that this is not a failure

后端 未结 1 587
挽巷
挽巷 2021-02-13 00:32

There is a question that I don\'t understand.

Allocator (GPU_0_bfc) ran out of memory trying to allocate 3.90GiB. 
The caller indicates that this is not a failu         


        
相关标签:
1条回答
  • 2021-02-13 01:14

    you're using the GPU, and your batchSize is 1000 it's a lot for 10 classes! make a smaller batch size like 10to20 and augment the range to 10e4 or even 10e3. This problem is well known . Any if you definitely want to use 10000 as batch size, tell tensorflow to use the CPU using :

    tf.device('/cpu:0')
    
    0 讨论(0)
提交回复
热议问题