# Memory Control
Tensorflow uses all available gpu memory by default. To use memory on demand:
physical_devices = tf.config.list_physical_devices('GPU')
for pd in physical_devices:
# this config must be put before any tf ops, e.g., tf.constant
tf.config.experimental.set_memory_growth(pd, True)