CUDA_ERROR_OUT_OF_MEMORY: out of memory. How to increase batch size? I have one GPU: GTX 1050 with ~4GB memory.
I try Mask RCNN with 192x192pix and batch=7. I got an error:  CUDA_ERROR_OUT_OF_MEMORY: out of memory
I found this
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
session = tf.Session(config=config, ...)

  File &quot;&lt;ipython-input-2-0806c9f06bd0&gt;&quot;, line 3
    session = tf.Session(config=config, ...)
                                       ^
SyntaxError: positional argument follows keyword argument
Environment:
1.CUDA 10.0
2.cuNDD 10.0
3.tensorflow 1.14.0
4.pip install opencv-contrib-python
5.git clone https://github.com/thtrieu/darkflow
6.Allowing GPU memory growth

Reference