Results 342 comments of François Chollet

It looks like it's implementable via a simple combination of a small number of existing backend ops. Sounds good to me!

> keras_nlp.upload_preset() vs keras_nlp.utils.upload_preset() vs keras_nlp.models.upload_preset()? Is a preset always model-related? If not, I'd recommend `keras_nlp.upload_preset()`.

This looks like you're using an old version of Keras 3, from before the time when we supported nested model inputs.

`_layers` is an internal property and you should not override it. Just use any other name.

> Will CI check for all backends ? No, it will not. Can you check by hand? No need to leave it running to completion, you can interrupt after `fit()`...

Yeah, something like `layer._inbound_nodes[i].outputs`. Note that you'd be using a private API so there's no strong guarantee that it will always work.

> Any recommendations for a "safer" way if you mention that it could change at any time to extract specific layer outputs from a backbone model ? I would recommend...

In the example above, you are passing the string `"fourier"` as activation. A string is not a tensor-in tensor-out callable, so it doesn't work as an activation. Your code, simplified:...

Please fix the failing torch test > FAILED keras/src/layers/preprocessing/rescaling_test.py::RescalingTest::test_rescaling_broadcast_output_shape - AssertionError: False is not true : Expected output shapes (2, 2) but received torch.Size([2, 2, 2])

> However, in CI environment, and specifically with the Torch backend, the output shape has an extra dimension. The key bit is that torch tests run with `image_data_format` set to...