tensorflow ResourceExhaustedError (see above for traceback): OOM when allocating tensor with shape [256,256,15,15] and type float on error (insufficient memory error)

The reason this occurs is not enough to cause gpu memory, usually we set up the program in accordance with the growth in demand caused by

 

 

Here, we set allow_growth = False can control the growth of video memory used to control the use of memory, and the program will not run half of the error.

This case is built on our memory is relatively small strategies used, if the memory is large enough that we do not worry about this problem.

Guess you like

Origin www.cnblogs.com/blogwangwang/p/11814243.html