当我尝试将keras模型部署到ML Engine时
$ gcloud ml-engine versions create v2 --model=plantDisease01 --origin=gs://${BUCKET_NAME}/
plantDisease01 --runtime-version=1.4
Creating version (this might take a few minutes)......failed. ERROR: (gcloud.ml-engine.versions.create) Bad model detected with error: "Failed to load model: Loading servable: {name: default version: 1} failed: Not found: Op type not registere
d 'ClipByValue' in binary running on localhost. Make sure the Op and Kernel are registered
in the binary running in this process.\n\n (Error code: 0)"
FAIL
我的存储看起来像
$ gsutil ls gs://keras-class-191806/plantDisease01/export [23:29:38]
gs://keras-class-191806/plantDisease01/export/
gs://keras-class-191806/plantDisease01/export/saved_model.pb
构建了协议缓冲区版本
答案 0 :(得分:1)
from py2neo import Graph
from py2neo import Node,Relationship
graph = Graph(password="root")
scity=(input("Enter Source City\n")).lower()
tcity=(input("Enter destination City\n")).lower()
amt=int(input("Enter threshold amount greater than\n"))
graph.run("LOAD CSV WITH HEADERS FROM 'file:///datanew.csv' as line
CREATE (Amount:Amount { Amt:toInteger(
line.amount),FrmCity:toLower(line.fcity),
Tocity:toLower(line.tcity)})")
qs="match(Amount:Amount) where Amount.Amt>{amot} and Amount.FrmCity=
{socity} and Amount.Tocity={tocity} return *"
graph.run(qs,amot=amt,socity=scity,tocity=tcity)
是introduced in TensorFlow 1.8。您可以自己操作register,也可以仅将ClipByValue
标志的值更改为1.8。