Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

No such layer: block1_conv1 #29

Open
varrella opened this issue Nov 19, 2021 · 2 comments
Open

No such layer: block1_conv1 #29

varrella opened this issue Nov 19, 2021 · 2 comments

Comments

@varrella
Copy link

when I change the value of "network" in default.cfg file, I got the following question, how to solve it?
It seems like the code works well when the value of "network" is "vgg16" or "vgg19", but when I modify the value of "network" to "densnet121" or "resnet152", the following problem will occur, how to solve it?

Traceback (most recent call last):
File "train_crfnet.py", line 431, in
main()
File "train_crfnet.py", line 326, in main
model, training_model, prediction_model = create_models(
File "train_crfnet.py", line 145, in create_models
model = model_with_weights(backbone_retinanet(num_classes, num_anchors=num_anchors, modifier=modifier, inputs=inputs, distance=distance, cfg=cfg), weights=weights, skip_mismatch=True, config=copy.deepcopy(cfg), num_classes=num_classes)
File "train_crfnet.py", line 91, in model_with_weights
model_weights = model.get_layer(layer_name).get_weights()
File "/home/ZT/anaconda3/envs/crfnet-tf2/lib/python3.8/site-packages/keras/engine/network.py", line 358, in get_layer
raise ValueError('No such layer: ' + name)
ValueError: No such layer: block1_conv1

fragment of default.cfg:
[CRF-Net]
channels = [0,1,2,5,18]
image_height = 360
image_width = 640

dropout_radar = 0.0
dropout_image = 0.2

network = densenet121
network_width = 1.0
pooling = max

anchor_params = small

@hershita07
Copy link

hey, did you get the solution to this?

@tejasri19
Copy link

@varrella @TUMFTM @fnobis I ran into the same error as mentioned above while changing the "network" to "densnet121" or "resnet152" . Help needed to resolve!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants