keras 发布flask 问题汇总

1,keras重复加载model会报错

解决办法:

import keras
# load之前保证session干净
keras.backend.clear_session()
model = load_model(args["model"])

2,linux后台启动python,丢失窗口后,无效

解决办法:

启动api: nohup python3 ImageNetApi.py > out.log 2>&1 &

启动

cd /usr/local/python3/lib/python3.5/site-packages/tensorboard

export LANG=zh_CN.UTF-8

nohup python3 main.py -logdir='/Data/servers/python/AI/TensorBoard_log' > out.log 2>&1 &

 

你可能感兴趣的:(AI,神经网络,人工智能)