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
Two fixes for image resizing in preprocessing (#1927)
1. Properly display when are not resizing the input image in
`model.summary()`
2. Allow setting the `image_size` directly on a preprocessing layer.
2. is just to allow a more consistent way to set the input shape
across tasks. We now have:
```python
text_classifier = keras_hub.models.TextClassifer.from_preset(
"bert_base_en",
)
text_classifier.preprocessor.sequence_length = 256
image_classifier = keras_hub.models.TextClassifer.from_preset(
"bert_base_en",
)
image_classifier.preprocessor.image_size = (256, 256)
multi_modal_lm = keras_hub.models.CausalLM.from_preset(
"some_preset",
)
multi_modal_lm.preprocessor.sequence_length = 256
multi_modal_lm.preprocessor.image_size = (256, 256)
```
0 commit comments