在Python中从CustomVision加载Tensorflow模型

时间:2019-03-10 02:50:17

标签: python tensorflow microsoft-custom-vision

我使用customvision.ai训练了模型,并导出了模型以在本地使用。

我对下一行有疑问:

[pipenv.exceptions.InstallError]: ['Collecting pyproj==2.0.0 (from -r /var/folders/g3/912
vtylj2hb71xf_d_8sxz480000gn/T/pipenv-qeun2uwi-requirements/pipenv-behbdii2-requirement.tx
t (line 1))', '  Using cached https://files.pythonhosted.org/packages/53/4b/21643a93e7d33
941498087290636e34c6d534aa8baa1ada54cf0d096ffaa/pyproj-2.0.0.tar.gz', '  Installing build
 dependencies: started', "  Installing build dependencies: finished with status 'done'",
'  Getting requirements to build wheel: started', "  Getting requirements to build wheel:
 finished with status 'error'", '  Complete output from command /Users/darcyprice/.local/
share/virtualenvs/pure-dawn-52933-x98m1awW/bin/python3 /Users/darcyprice/.local/share/vir
tualenvs/pure-dawn-52933-x98m1awW/lib/python3.6/site-packages/pip/_vendor/pep517/_in_proc
ess.py get_requires_for_build_wheel /var/folders/g3/912vtylj2hb71xf_d_8sxz480000gn/T/tmpw
q5vvpkd:', '  Proj executable not found. Please set PROJ_DIR variable.', '  ', '  -------
---------------------------------']
[pipenv.exceptions.InstallError]: ['Command "/Users/darcyprice/.local/share/virtualenvs/p
ure-dawn-52933-x98m1awW/bin/python3 /Users/darcyprice/.local/share/virtualenvs/pure-dawn-
52933-x98m1awW/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py get_requires
_for_build_wheel /var/folders/g3/912vtylj2hb71xf_d_8sxz480000gn/T/tmpwq5vvpkd" failed wit
h error code 1 in /private/var/folders/g3/912vtylj2hb71xf_d_8sxz480000gn/T/pip-install-t_
ap8o3w/pyproj']

当我将output_layer = 'loss:0' "The name 'loss:0' refers to a Tensor which does not exist. The operation, 'loss', does not exist in the graph." 更改为= output_layer时,会收到此错误,因为我有80x80x3的图像要测试:

output_layer = 'model_outputs:0'

这是源代码:

Cannot feed value of shape (1, 80, 80, 3) for Tensor 'Placeholder:0', which has shape '(?, 416, 416, 3)'

0 个答案:

没有答案