I am having an error on the input and output parameters in Model. It’s giving that error:
1037 f’Graph disconnected: cannot obtain value for tensor {x} ’
1038 f’at layer “{layer.name}”. The following previous layers ’
1039 f’were accessed without issue: {layers_with_complete_input}')
ValueError: Graph disconnected: cannot obtain value for tensor KerasTensor(type_spec=TensorSpec(shape=(None, 224, 224, 3), dtype=tf.float32, name=‘input_2’), name=‘input_2’, description=“created by layer ‘input_2’”) at layer “block1_conv1”. The following previous layers were accessed without issue:
Can anyone help? Thank you
bboxHead = Dense(128, activation=“relu”)(flatten)
bboxHead = Dense(64, activation=“relu”)(bboxHead)
bboxHead = Dense(32, activation=“relu”)(bboxHead)
bboxHead = Dense(4, activation=“sigmoid”,
name=“bounding_box”)(bboxHead)
construct a second fully-connected layer head, this one to predict
the class label
softmaxHead = Dense(512, activation=“relu”)(flatten)
softmaxHead = Dropout(0.5)(softmaxHead)
softmaxHead = Dense(512, activation=“relu”)(softmaxHead)
softmaxHead = Dropout(0.5)(softmaxHead)
softmaxHead = Dense(len(lb.classes_), activation=“softmax”,
name=“class_label”)(softmaxHead)
put together our model which accept an input image and then output
bounding box coordinates and a class label
model = Model(
inputs=rn50v2.input,
outputs=(bboxHead, softmaxHead))