我正在用Python运行以下代码:
import redis
conn = redis.Redis(host=url.hostname, port=url.port)
with open('models/tiny-yolo-voc.pb', 'rb') as f:
model = f.read()
res = conn.execute_command('AI.MODELSET', 'yolo:model', 'TF', args.device, 'INPUTS', 'input', 'OUTPUTS', 'output', model)
并得到一个错误:
Exception has occurred: ResponseError Insufficient arguments, missing model BLOB File "/home/baruchk/EdgeRealtimeVideoAnalytics/app/init.py", line 36, in res = conn.execute_command('AI.MODELSET', 'yolo:model', 'TF', args.device, 'INPUTS', 'input', 'OUTPUTS', 'output', model)
查看调试器,我可以看到模型,如下所示:
b'version https://git-lfs.github.com/spec/v1\noid sha256:5a48ca053cf228a10023f11f92274efdaac7a0f991d7f15066add62523612137\nsize 63481382\n'
有人知道发生了什么吗?我加载模型的方式是否有问题?格式
我相信你忘记了
BLOB
关键字。请参见docs中的此处。 所以你的代码应该是相关问题 更多 >
编程相关推荐