Error allocator -gpu when execute vgg16 100 epoche and 16 bache size

salamo alaykom all (Hi every bady)

when i execute python code DL (vgg16) 100 epoch ,bache size=16 in syuder v5 (python 3.8) i m blocked at 33-40 or 60 eth epoche by the folowing error :

2023-04-06 19:43:19.624393: I tensorflow/core/common_runtime/] total_region_allocated_bytes_: 2940016896 memory_limit_: 2940017051 available bytes: 155 curr_region_allocation_bytes_: 5880034304

2023-04-06 19:43:19.624405: I tensorflow/core/common_runtime/] Stats:

Limit: 2940017051

InUse: 1487487232

MaxInUse: 2386061824

NumAllocs: 903

MaxAllocSize: 447217664

Reserved: 0

PeakReserved: 0

LargestFreeBlock: 0

2023-04-06 19:43:19.624420: W tensorflow/core/common_runtime/]

Hi @recherche_touahema, This error generally occurs when the memory required by your model exceeds the available resources. Could please try to reduce the batch size and also try to enable the memory growth by using tf.config.experimental.set_memory_growth('gpu', True). Thank You.