Skip to content

Value Error when calling get_detr_model #53

@tobilab

Description

@tobilab

I'am using your code with Tensorflow version 2.15.0 and Keras version 3.0.4

If i call the lines of get_detr_model(config,...) then an Value Error arises with the following message:
ValueError: A KerasTensor cannot be used as input to a TensorFlow function. A KerasTensor is a symbolic placeholder for a shape and dtype, used when constructing Keras Functional models or Keras Functions. You can only use it as input to a Keras layer or a Keras operation (from the namespaces keras.layersandkeras.operations)

The error seems to be caused by line 172 in detr.py: masks = tf.zeros((tf.shape(x)[0], tf.shape(x)[1], tf.shape(x)[2]), tf.bool).

The code that i use is from your tutorial here at the section Load the detr model.

What am i doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions