-
Notifications
You must be signed in to change notification settings - Fork 784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RuntimeError: The layer has never been called and thus has no defined output shape. #462
Comments
+1 |
with open(config_path) as config_buffer: ############################### Make the model############################### yolo = YOLO(backend = config['model']['backend'], ############################### Load trained weights############################### yolo.load_weights(weights_path) Output:::::::::::::::::::::::::::::::::RuntimeError Traceback (most recent call last) ~\Eduardo\ModelosProntosSingapura\keras-yolo2-master\frontend.py in init(self, backend, input_size, labels, max_box_per_image, anchors) ~\Eduardo\ModelosProntosSingapura\keras-yolo2-master\backend.py in get_output_shape(self) ~\Anaconda3\envs\TesteComYolo\lib\site-packages\keras\engine\base_layer.py in get_output_shape_at(self, node_index) ~\Anaconda3\envs\TesteComYolo\lib\site-packages\keras\engine\base_layer.py in _get_node_attribute_at_index(self, node_index, attr, attr_name) RuntimeError: The layer model has never been called and thus has no defined {attr_name}. |
Hi I trying to train train.py with backend model as Full Yolo or ResNet50. But I encounter the following error. CCould you please let me know what could be the error here. tHanks
Traceback (most recent call last):
File "train.py", line 101, in
main(args)
File "train.py", line 70, in main
anchors = config['model']['anchors'])
File "/Users/priyanka/Desktop/Yolo/YOLO_V2_Resnet/keras-yolo2/frontend.py", line 60, in init
print(self.feature_extractor.get_output_shape())
File "/Users/priyanka/Desktop/Yolo/YOLO_V2_Resnet/keras-yolo2/backend.py", line 33, in get_output_shape
return self.feature_extractor.get_output_shape_at(-1)[1:3]
File "//anaconda3/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer.py", line 2040, in get_output_shape_at
'output shape')
File "//anaconda3/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer.py", line 2631, in _get_node_attribute_at_index
'and thus has no defined ' + attr_name + '.')
RuntimeError: The layer has never been called and thus has no defined output shape.
The text was updated successfully, but these errors were encountered: