目录
vim ~/.keras/keras.json
,修改为
{
"epsilon": 1e-07,
"floatx": "float32",
"image_data_format": "channels_last",
"backend": "theano"
}
import theano
theano.config.openmp = True
至少要是482的
export PATH=/opt/compiler/gcc-4.8.2/bin/:$PATH
OMP_NUM_THREADS=20 python xxx.py
参考:Tensorflow并行:多核(multicore),多线程(multi-thread)
jumbo install htop
htop样例如下: