tensorflow gpu memory 조절하기
tensorflow를 이용하다 보면 학습 중에 gpu 메모리를 모두 사용중이어서 다른 작업을 하지 못하는 경우가 있다. 이럴 때는 아래와 같이 사용할 gpu memory를 조정해주면 된다. config = tf.ConfigProto() config.gpu_options.per_process_gpu_memory_fraction = 0.4 sess = tf.Session(config=config) as sess: or config = tf.ConfigProto() config.gpu_options.allow_growth = True sess= tf.Session(config=config):