Closed Vova-B closed 3 years ago
I get the same error on predict on single image. I guess it is a TF2.4 issue, since I had it working on TF2.3
I get the same error above on 2.4. On 2.3 I get this instead
Traceback (most recent call last):
File "inference.py", line 63, in <module>
main()
File "inference.py", line 26, in main
_, model = efficientdet(phi=phi,
File "/home/dheera/Dropbox/code/EfficientDet/model.py", line 443, in efficientdet
classification = [class_net([feature, i]) for i, feature in enumerate(fpn_features)]
File "/home/dheera/Dropbox/code/EfficientDet/model.py", line 443, in <listcomp>
classification = [class_net([feature, i]) for i, feature in enumerate(fpn_features)]
File "/home/dheera/venv/tf2.3/lib/python3.8/site-packages/tensorflow/python/keras/engine/base_layer.py", line 924, in __call__
if _in_functional_construction_mode(self, inputs, args, kwargs, input_list):
File "/home/dheera/venv/tf2.3/lib/python3.8/site-packages/tensorflow/python/keras/engine/base_layer.py", line 3223, in _in_functional_construction_mode
raise ValueError('It appears you are trying to construct a '
ValueError: It appears you are trying to construct a functional model, but not all of the inputs in the first positional argument of your layer call are symbolic tensors. (Input objects, or the output of another layer) Functional models cannot correctly track custom layers unless all values in the first call argument are symbolic.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I try to start
inference.py
and get errorIndexError: list index out of range
. What could be the problem?Full error code: