Skip to content
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

YOLOV8Backbone inconsistent output tensor shapes on Torch backend #2461

Open
DLumi opened this issue Jun 26, 2024 · 0 comments
Open

YOLOV8Backbone inconsistent output tensor shapes on Torch backend #2461

DLumi opened this issue Jun 26, 2024 · 0 comments
Assignees
Labels
type:Bug Something isn't working

Comments

@DLumi
Copy link

DLumi commented Jun 26, 2024

Current Behavior:

Variable output shapes are not handled correctly when build() is called by a Sequential model (Torch backend only)

Expected Behavior:

Variable shapes remain variable

Steps To Reproduce:

This shape inconsistency is only for Torch backend. It works fine on TF. (not tested with JAX, though)

  1. Define an input shape with at least one variable dimension, say (224, None, 3)
  2. Make a subclass keras.Model called, say, MyModel, instantiate YOLOV8Backbone, and add it as an attribute of this subclass
  3. Make a subclass keras.Sequential called, say, AnotherModel , instantiate MyModel and self.add it as a layer of this subclass
  4. Instantiate AnotherModel and check its output shape. Based off the input shape we defined, it should be [None, 14, None, 512], but it's [None, 14, 6, 512] instead

Colab notebook

Version:

keras_cv==0.9.0
keras==3.4.0
torch==2.3.0+cu121
tensorflow==2.15.0

Anything else:

N/A

@mehtamansi29 mehtamansi29 added the type:Bug Something isn't working label Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants