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
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.
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 theModel
instance was constructed with eager mode enabled. Please construct yourModel
instance in graph mode or callModel.predict
with eager mode enabled.