ialhashim / DenseDepth

High Quality Monocular Depth Estimation via Transfer Learning
https://arxiv.org/abs/1812.11941
GNU General Public License v3.0
1.58k stars 354 forks source link

Calling `Model.predict` in graph mode is not supported when the `Model` instance was constructed with eager mode enabled. Please construct your `Model` instance in graph mode or call `Model.predict` with eager mode enab #177

Closed ghost closed 3 years ago

ghost commented 3 years ago

Traceback (most recent call last): File "demo.py", line 149, in loadModel self.updateCloud() File "demo.py", line 202, in updateCloud depth = (1000 / self.model.predict( np.expand_dims(self.glWidget.rgb, axis=0) )) / 1000 File "C:\Users\DGRE.conda\envs\DenseDepth\lib\site-packages\tensorflow\python\keras\engine\training.py", line 130, in _method_wrapper return method(self, *args, **kwargs) File "C:\Users\DGRE.conda\envs\DenseDepth\lib\site-packages\tensorflow\python\keras\engine\training.py", line 1562, in predict version_utils.disallow_legacy_graph('Model', 'predict') File "C:\Users\DGRE.conda\envs\DenseDepth\lib\site-packages\tensorflow\python\keras\utils\version_utils.py", line 122, in disallow_legacy_graph raise ValueError(error_msg) ValueError: Calling Model.predict in graph mode is not supported when the Model instance was constructed with eager mode enabled. Please construct your Model instance in graph mode or call Model.predict with eager mode enabled.