2020
10-08
10-08
Keras模型转成tensorflow的.pb操作
Keras的.h5模型转成tensorflow的.pb格式模型,方便后期的前端部署。直接上代码fromkeras.modelsimportModelfromkeras.layersimportDense,Dropoutfromkeras.applications.mobilenetimportMobileNetfromkeras.applications.mobilenetimportpreprocess_inputfromkeras.preprocessing.imageimportload_img,img_to_arrayimporttensorflowastffromkerasimportbackendasKimportosbase_model=MobileNet((None...
继续阅读 >