Skip to content

RuntimeError: The layer has never been called and thus has no defined output shape. #462

@PRBtc

Description

@PRBtc

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions