You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
Define an input shape with at least one variable dimension, say (224, None, 3)
Make a subclass keras.Model called, say, MyModel, instantiate YOLOV8Backbone, and add it as an attribute of this subclass
Make a subclass keras.Sequential called, say, AnotherModel , instantiate MyModel and self.add it as a layer of this subclass
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
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)
(224, None, 3)
keras.Model
called, say, MyModel, instantiate YOLOV8Backbone, and add it as an attribute of this subclasskeras.Sequential
called, say, AnotherModel , instantiate MyModel andself.add
it as a layer of this subclass[None, 14, None, 512]
, but it's[None, 14, 6, 512]
insteadColab notebook
Version:
keras_cv==0.9.0
keras==3.4.0
torch==2.3.0+cu121
tensorflow==2.15.0
Anything else:
N/A
The text was updated successfully, but these errors were encountered: