1. list和array相互转换
val_X类型为list
val_X = np.array(val_X)
a类型为array
a = a.tolist()
2. keras多GPU训练
from keras.utils import multi_gpu_model
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "0,1"
model_body = multi_gpu_model(model_body,gpus=2)
3.
nvidia-smi
kill -s 9 15134
15134 是nvidia-smi 得到的进程号