keras-hub-nightly 0.19.0.dev202502240348__py3-none-any.whl → 0.19.0.dev202502260348__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -128,14 +128,8 @@ class CachedGemmaAttention(keras.layers.Layer):
128
128
  "Please set `dropout` to 0.0."
129
129
  )
130
130
  if attention_mask is not None:
131
- while len(attention_mask.shape) < 4:
132
- attention_mask = ops.expand_dims(
133
- attention_mask, axis=1
134
- ) # Add dimension for num_heads
135
- if attention_mask.shape[1] != self.num_query_heads:
136
- attention_mask = ops.tile(
137
- attention_mask, [1, self.num_query_heads, 1, 1]
138
- )
131
+ attention_mask = ops.expand_dims(attention_mask, axis=1)
132
+ attention_mask = ops.cast(attention_mask, dtype="bool")
139
133
 
140
134
  attention_output = ops.dot_product_attention(
141
135
  query=q,
@@ -0,0 +1,5 @@
1
+ from keras_hub.src.models.mobilenet.mobilenet_backbone import MobileNetBackbone
2
+ from keras_hub.src.models.mobilenet.mobilenet_presets import backbone_presets
3
+ from keras_hub.src.utils.preset_utils import register_presets
4
+
5
+ register_presets(backbone_presets, MobileNetBackbone)
@@ -1,10 +1,10 @@
1
1
  """MobileNet preset configurations."""
2
2
 
3
3
  backbone_presets = {
4
- "mobilenetv3_small_050": {
4
+ "mobilenet_v3_small_050_imagenet": {
5
5
  "metadata": {
6
6
  "description": (
7
- "Small Mobilenet V3 model pre-trained on the ImageNet 1k "
7
+ "Small MobileNet V3 model pre-trained on the ImageNet 1k "
8
8
  "dataset at a 224x224 resolution."
9
9
  ),
10
10
  "params": 278784,
@@ -1,7 +1,7 @@
1
1
  from keras_hub.src.api_export import keras_hub_export
2
2
 
3
3
  # Unique source of truth for the version number.
4
- __version__ = "0.19.0.dev202502240348"
4
+ __version__ = "0.19.0.dev202502260348"
5
5
 
6
6
 
7
7
  @keras_hub_export("keras_hub.version")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: keras-hub-nightly
3
- Version: 0.19.0.dev202502240348
3
+ Version: 0.19.0.dev202502260348
4
4
  Summary: Industry-strength Natural Language Processing extensions for Keras.
5
5
  Home-page: https://github.com/keras-team/keras-hub
6
6
  Author: Keras team
@@ -8,7 +8,7 @@ keras_hub/api/tokenizers/__init__.py,sha256=mtJgQy1spfQnPAkeLoeinsT_W9iCWHlJXwzc
8
8
  keras_hub/api/utils/__init__.py,sha256=Gp1E6gG-RtKQS3PBEQEOz9PQvXkXaJ0ySGMqZ7myN7A,215
9
9
  keras_hub/src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  keras_hub/src/api_export.py,sha256=9pQZK27JObxWZ96QPLBp1OBsjWigh1iuV6RglPGMRk0,1499
11
- keras_hub/src/version_utils.py,sha256=XCLWyoXBm9IL-zbsaOkDKtL1osvE-Ms3cQ8TKPaa5Hk,222
11
+ keras_hub/src/version_utils.py,sha256=-W47SdsX5R3uDVKtbxAE3d55JBaq3PpOTMiig51GIhI,222
12
12
  keras_hub/src/layers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  keras_hub/src/layers/modeling/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  keras_hub/src/layers/modeling/alibi_bias.py,sha256=1XBTHI52L_iJDhN_w5ydu_iMhCuTgQAxEPwcLA6BPuk,4411
@@ -183,7 +183,7 @@ keras_hub/src/models/flux/flux_presets.py,sha256=z7C_FbI1_F5YETXuWpc7Yh_0w-5N0eB
183
183
  keras_hub/src/models/flux/flux_text_to_image.py,sha256=Rf5dD2EhG0bE8Gyg9sqaA8YEexS1kdraofIkxiZDjvc,4166
184
184
  keras_hub/src/models/flux/flux_text_to_image_preprocessor.py,sha256=Fs9jr97QtmRUbRRz1kITpkuhDM2GoV3n0XSFC-qQA14,2252
185
185
  keras_hub/src/models/gemma/__init__.py,sha256=rVzOJMJ39bgVlT8UdC0t8PlN2c237GKTBmfHIsbPuOQ,251
186
- keras_hub/src/models/gemma/gemma_attention.py,sha256=FyCwSFckvOTg-KHKulollrsZthdw1IX3WNe5X3qq1-w,9562
186
+ keras_hub/src/models/gemma/gemma_attention.py,sha256=wlpLfr74MOtJ18JFku6jpV2c_iRav5Q1bZiFm9e1nPU,9291
187
187
  keras_hub/src/models/gemma/gemma_backbone.py,sha256=GzAUSArw_pN9dtWQzTVhWDbW-XyWt4GyMcFLn9hwmh0,13391
188
188
  keras_hub/src/models/gemma/gemma_causal_lm.py,sha256=3OXaIXlrKqMIuUnBk-bUz-0SYFL-XkkQTWm8qRY2YII,16770
189
189
  keras_hub/src/models/gemma/gemma_causal_lm_preprocessor.py,sha256=bpKkEurWIfa6Kp9s4pz84-sBDSA6ZFNHP8nXG1fFQrg,2912
@@ -236,12 +236,12 @@ keras_hub/src/models/mit/mit_image_classifier_preprocessor.py,sha256=oNYs-pUK8Vn
236
236
  keras_hub/src/models/mit/mit_image_converter.py,sha256=Mw7nV-OzyBveGuZUNFsPPKyq9jXJVW2_cVH024CNkXM,311
237
237
  keras_hub/src/models/mit/mit_layers.py,sha256=HUJO5uhJ6jgwANpwbQdPlEVwLRVb3BZQ-Ftjg3B9XvY,9734
238
238
  keras_hub/src/models/mit/mit_presets.py,sha256=ooLrh2OoGZKxnCGnhB6BynYJtVCXH7nDDFhgQRWt36U,4528
239
- keras_hub/src/models/mobilenet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
239
+ keras_hub/src/models/mobilenet/__init__.py,sha256=hxkNGGj_iAMu62iooUDEPA818sNOIgjG7pXMLEMOsAE,275
240
240
  keras_hub/src/models/mobilenet/mobilenet_backbone.py,sha256=kUEDzML7MzXjUVKDY0BFn-sjGFJbu8IB8DBvG8t2nLA,28880
241
241
  keras_hub/src/models/mobilenet/mobilenet_image_classifier.py,sha256=jgyEn_WO5zLqC9UIuRV564rIY_8bMsmuUBaJA9ag5N0,2310
242
242
  keras_hub/src/models/mobilenet/mobilenet_image_classifier_preprocessor.py,sha256=yqM4wQ3ae7wXTBO0aMuvJx6XqllA7Psqzjvpm2NABXM,573
243
243
  keras_hub/src/models/mobilenet/mobilenet_image_converter.py,sha256=a3Ka0UYYK5wHSOjf2oMHSgofRazTAeUfttklVefq14w,360
244
- keras_hub/src/models/mobilenet/mobilenet_presets.py,sha256=TzM3geY5FJ8Myj7V_EseRgp2RvgL66pmXAUhn5qIwGw,464
244
+ keras_hub/src/models/mobilenet/mobilenet_presets.py,sha256=PVakQu7HFRqtQdDHUzuvx_tyTWPc7BwKmWTPiHzP9C8,474
245
245
  keras_hub/src/models/mobilenet/util.py,sha256=S7j4UacmVIJ3fU8cymyAoK49eHcpWIKTOyUQiEjcbzQ,721
246
246
  keras_hub/src/models/opt/__init__.py,sha256=6Ybj8etxNaPsVcuZvaeHnKB3As92Px--dbiFAqOCIT0,239
247
247
  keras_hub/src/models/opt/opt_backbone.py,sha256=mK5z_E5mSiIX5s0w4hr4IVQpT7K46W2ajZBmuMjxwaY,5873
@@ -413,7 +413,7 @@ keras_hub/src/utils/transformers/convert_pali_gemma.py,sha256=B1leeDw96Yvu81hYum
413
413
  keras_hub/src/utils/transformers/convert_vit.py,sha256=9SUZ9utNJhW_5cj3acMn9cRy47u2eIcDsrhmzj77o9k,5187
414
414
  keras_hub/src/utils/transformers/preset_loader.py,sha256=DgGJXbTSB9Na8FIR-YWWVqQPOFxHwWrGm41EwcS_EFs,3797
415
415
  keras_hub/src/utils/transformers/safetensor_utils.py,sha256=CYUHyA4y-B61r7NDnCsFb4t_UmSwZ1k9L-8gzEd6KRg,3339
416
- keras_hub_nightly-0.19.0.dev202502240348.dist-info/METADATA,sha256=Bb5N0tDPX_Vf_ffvXO6di5yMnD8TlVADQdlqn6Efcj8,7721
417
- keras_hub_nightly-0.19.0.dev202502240348.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
418
- keras_hub_nightly-0.19.0.dev202502240348.dist-info/top_level.txt,sha256=N4J6piIWBKa38A4uV-CnIopnOEf8mHAbkNXafXm_CuA,10
419
- keras_hub_nightly-0.19.0.dev202502240348.dist-info/RECORD,,
416
+ keras_hub_nightly-0.19.0.dev202502260348.dist-info/METADATA,sha256=xUUblqQWpw1XLp9rdhPS1dt77AQQB78gk6GPqOomVbY,7721
417
+ keras_hub_nightly-0.19.0.dev202502260348.dist-info/WHEEL,sha256=nn6H5-ilmfVryoAQl3ZQ2l8SH5imPWFpm1A5FgEuFV4,91
418
+ keras_hub_nightly-0.19.0.dev202502260348.dist-info/top_level.txt,sha256=N4J6piIWBKa38A4uV-CnIopnOEf8mHAbkNXafXm_CuA,10
419
+ keras_hub_nightly-0.19.0.dev202502260348.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.0)
2
+ Generator: setuptools (75.8.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5