Tensorflow如何选择GPU?

CUDA_VISIBLE_DEVICES=1 python run.py
or
import os
os.environ["CUDA_VISIBLE_DEVICES"]="1"