import tensorflow as tf

        tf.config.experimental.set_virtual_device_configuration(gpus[0],
            [tf.config.experimental.VirtualDeviceConfiguration(memory_limit=memory_limit)])
    else:
        gpu_options = tf.GPUOptions(allow_growth=allow_growth,
                                  per_process_gpu_memory_fraction=fraction)
        config = tf.ConfigProto(gpu_options=gpu_options)
        session = tf.Session(config=config)
        K.set_session(session)


def multi_gpu(model, gpus=None, cpu_merge=True, cpu_relocation=False):

