Skip to content

issue: keras-cv MaybeApply in KPL #1783

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

Closed
innat opened this issue May 14, 2023 · 0 comments
Closed

issue: keras-cv MaybeApply in KPL #1783

innat opened this issue May 14, 2023 · 0 comments

Comments

@innat
Copy link
Contributor

innat commented May 14, 2023

Describe

TF 2.12
KerasCV: 0.5

I've tried to run MaybeApply layer on other layers but it gives error,

augmenter = keras.Sequential(
    layers=[
        preprocessor,

        keras_cv.layers.MaybeApply(
            keras_cv.layers.RandomFlip(mode="horizontal", bounding_box_format="xywh"),
            rate=0.7
        ),

        keras_cv.layers.MaybeApply(
            keras_cv.layers.RandomChoice(
                layers=[
                    keras_cv.layers.ChannelShuffle(),
                    keras_cv.layers.RandomChannelShift(value_range=(0, 255), factor=0.2),
                ]),
            rate=0.5
        )
    ]
)

ValueError: Either both boxes and classes should be Ragged, or neither should be ragged. Got type(boxes)=<class 'tensorflow.python.ops.ragged.ragged_tensor.RaggedTensor'>, type(classes)=<class 'tensorflow.python.framework.ops.Tensor'>.

Gist.

@innat innat changed the title issue: keras-cv MaybeApply in object detection issue: keras-cv MaybeApply in KPL May 14, 2023
@innat innat closed this as completed Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant