title: python script that runs in pycharm has memory allocation error when running from command line
body: <p>I have a script to train a CNN, with keras over tensorflow 2.0.0, it works great when I use pycharm, 
  But when I run it from the comment line (python train.py) it crashes because of allocation issues:
   <a href="https://i.stack.imgur.com/sN9wI.png" rel="nofollow noreferrer">enter image description here</a>
  I tried workers=1 and use_multiprocessing=False is the fit_generator, it didn't help.
  Any idea of why this is happening? what happens in pycharm that is missing in the terminal?</p>
  
  <p>I’m running on NVIDIA tf 2.0.0 docker container. </p>