tf-keras-nightly 2.18.0.dev2024081409__py3-none-any.whl → 2.18.0.dev2024081509__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.
tf_keras/__init__.py CHANGED
@@ -27,4 +27,4 @@ from tf_keras.src.engine.sequential import Sequential
27
27
  from tf_keras.src.engine.training import Model
28
28
 
29
29
 
30
- __version__ = "2.18.0.dev2024081409"
30
+ __version__ = "2.18.0.dev2024081509"
@@ -578,7 +578,8 @@ class Layer(tf.Module, version_utils.LayerVersionSelector):
578
578
  Accepted values are constants defined in the class
579
579
  `tf.VariableAggregation`.
580
580
  **kwargs: Additional keyword arguments. Accepted values are `getter`,
581
- `collections`, `experimental_autocast` and `caching_device`.
581
+ `collections`, `autocast`, `experimental_autocast` and
582
+ `caching_device`.
582
583
 
583
584
  Returns:
584
585
  The variable created.
@@ -594,6 +595,7 @@ class Layer(tf.Module, version_utils.LayerVersionSelector):
594
595
  # Validate optional keyword arguments.
595
596
  for kwarg in kwargs:
596
597
  if kwarg not in [
598
+ "autocast",
597
599
  "collections",
598
600
  "experimental_autocast",
599
601
  "caching_device",
@@ -603,9 +605,13 @@ class Layer(tf.Module, version_utils.LayerVersionSelector):
603
605
  ]:
604
606
  raise TypeError("Unknown keyword argument:", kwarg)
605
607
  collections_arg = kwargs.pop("collections", None)
606
- # 'experimental_autocast' can be set to False by the caller to indicate
607
- # an AutoCastVariable should never be created.
608
- autocast = kwargs.pop("experimental_autocast", True)
608
+ # 'autocast' or 'experimental_autocast' can be set to False by the
609
+ # caller to indicate an AutoCastVariable should never be created.
610
+ autocast = kwargs.pop("autocast", None)
611
+ if autocast is None:
612
+ autocast = kwargs.pop("experimental_autocast", None)
613
+ if autocast is None:
614
+ autocast = True
609
615
  # See the docstring for tf.Variable about the details for
610
616
  # caching_device.
611
617
  caching_device = kwargs.pop("caching_device", None)
@@ -352,7 +352,8 @@ class Layer(base_layer.Layer):
352
352
  Accepted values are constants defined in the class
353
353
  `tf.VariableAggregation`.
354
354
  **kwargs: Additional keyword arguments. Accepted values are `getter`,
355
- `collections`, `experimental_autocast` and `caching_device`.
355
+ `collections`, `autocast`, `experimental_autocast` and
356
+ `caching_device`.
356
357
 
357
358
  Returns:
358
359
  The created variable. Usually either a `Variable` or
@@ -371,6 +372,7 @@ class Layer(base_layer.Layer):
371
372
  # Validate optional keyword arguments.
372
373
  for kwarg in kwargs:
373
374
  if kwarg not in [
375
+ "autocast",
374
376
  "getter",
375
377
  "collections",
376
378
  "experimental_autocast",
@@ -380,9 +382,13 @@ class Layer(base_layer.Layer):
380
382
  has_custom_getter = "getter" in kwargs
381
383
  getter = kwargs.pop("getter", base_layer_utils.make_variable)
382
384
  collections_arg = kwargs.pop("collections", None)
383
- # 'experimental_autocast' can be set to False by the caller to indicate
384
- # an AutoCastVariable should never be created.
385
- autocast = kwargs.pop("experimental_autocast", True)
385
+ # 'autocast' or 'experimental_autocast' can be set to False by the
386
+ # caller to indicate an AutoCastVariable should never be created.
387
+ autocast = kwargs.pop("autocast", None)
388
+ if autocast is None:
389
+ autocast = kwargs.pop("experimental_autocast", None)
390
+ if autocast is None:
391
+ autocast = True
386
392
  # See the docstring for tf.Variable about the details for
387
393
  # caching_device.
388
394
  caching_device = kwargs.pop("caching_device", None)
@@ -214,7 +214,7 @@ class MultiplyLayerWithoutAutoCast(MultiplyLayer):
214
214
  (),
215
215
  initializer="ones",
216
216
  dtype=dtype,
217
- experimental_autocast=False,
217
+ autocast=False,
218
218
  regularizer=self._regularizer,
219
219
  )
220
220
  self.built = True
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tf_keras-nightly
3
- Version: 2.18.0.dev2024081409
3
+ Version: 2.18.0.dev2024081509
4
4
  Summary: Deep learning for humans.
5
5
  Home-page: https://keras.io/
6
6
  Download-URL: https://github.com/keras-team/tf-keras/tags
@@ -1,4 +1,4 @@
1
- tf_keras/__init__.py,sha256=MLtgryxkkt_Yi9SIzJRJewakcvoVMsRqImGpPJVoxB8,911
1
+ tf_keras/__init__.py,sha256=SNpPk2ne5jL3zDugiQp2KKcORaaprlH_ibpjUXdOyuE,911
2
2
  tf_keras/__internal__/__init__.py,sha256=OHQbeIC0QtRBI7dgXaJaVbH8F00x8dCI-DvEcIfyMsE,671
3
3
  tf_keras/__internal__/backend/__init__.py,sha256=LnMs2A6685gDG79fxqmdulIYlVE_3WmXlBTBo9ZWYcw,162
4
4
  tf_keras/__internal__/layers/__init__.py,sha256=F5SGMhOTPzm-PR44VrfinURHcVeQPIEdwnZlAkSTB3A,176
@@ -271,9 +271,9 @@ tf_keras/src/dtensor/lazy_variable.py,sha256=c3yylbga0se3Geflutss3fz5RzBYuY2vkU3
271
271
  tf_keras/src/dtensor/test_util.py,sha256=9QAbt44mlirdqwG2ertTsoXNKG2V4Z0bqJFxGdxy5BY,4572
272
272
  tf_keras/src/dtensor/utils.py,sha256=2TTSCEOA61Ia1FAPfQWJ2CRfiocBGUZreXH9UBFzFbk,6441
273
273
  tf_keras/src/engine/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
274
- tf_keras/src/engine/base_layer.py,sha256=kq1K9x9aV50OzzEIArw-TQBYdB4N3c0NzHQZVi-XrUw,156299
274
+ tf_keras/src/engine/base_layer.py,sha256=PaypExNUkGaWuIn9tiLN41AxSIhEXAals7b99Md0Yx8,156511
275
275
  tf_keras/src/engine/base_layer_utils.py,sha256=YMJF5sZJhFF_yzfqOtqi4YTsyUE2ZQ_cJJOIdXnuS2w,35795
276
- tf_keras/src/engine/base_layer_v1.py,sha256=9jpJghCGqspWltVbWXu2TIUPUhk53y-xS84IXQCoEHs,102488
276
+ tf_keras/src/engine/base_layer_v1.py,sha256=cX-OCSNio3Tr2M6twr_PUgKulePLZDNW_4xLXjgYbN4,102700
277
277
  tf_keras/src/engine/base_preprocessing_layer.py,sha256=xne5VVtj9_IE1_cjh-kaPk-utoMY7mYwTOcgybFfY34,12650
278
278
  tf_keras/src/engine/compile_utils.py,sha256=F6KxbaXnppns5XCOJl8wzsiQ1riEp43s0G0SWsWAUE0,31757
279
279
  tf_keras/src/engine/data_adapter.py,sha256=Zb5Pyb88Zg5GuM3zjGVK65O3PlV_HIRBuQ6v-tzVL7w,71752
@@ -495,7 +495,7 @@ tf_keras/src/mixed_precision/autocast_variable.py,sha256=1Rz_cG1qtInnbCtKRJtP59Y
495
495
  tf_keras/src/mixed_precision/device_compatibility_check.py,sha256=oSVZwizUlPMTnhJxr7zgWxX2v8jHOHhyZCwDCo8aYK0,6252
496
496
  tf_keras/src/mixed_precision/loss_scale_optimizer.py,sha256=A_WXEJc0XCAWFsy55f6EWmDORRSX4LoeGcHrC-upHvo,64122
497
497
  tf_keras/src/mixed_precision/policy.py,sha256=1GWHp99dU0f6D0h_jIrSQkoLyIf0ClRJ0BbwHqIYiCg,22734
498
- tf_keras/src/mixed_precision/test_util.py,sha256=0eyuVXK2z6BoqrTNgGTXaT57jBsU2_tKeedbDqa5-7c,8523
498
+ tf_keras/src/mixed_precision/test_util.py,sha256=po2OTcD7IYt_Bkl3O8MJlEQ-4lNmOEDhNHL_VwzGim8,8510
499
499
  tf_keras/src/models/__init__.py,sha256=VQ3cZve-CsmM_4CEi9q-V7m2qFO9HbdiO38mAR4dKdM,1823
500
500
  tf_keras/src/models/cloning.py,sha256=PHLTG0gSjvoKl8jxGaLCUq3ejK_o0PNA7gxSqxyoLBI,36839
501
501
  tf_keras/src/models/sharpness_aware_minimization.py,sha256=4nofg5_fbrRuGa5RAIQwJ-OL8eeiWg7jlNkMuJSCB_g,7301
@@ -606,7 +606,7 @@ tf_keras/src/utils/legacy/__init__.py,sha256=EfMmeHYDzwvxNaktPhQbkTdcPSIGCqMhBND
606
606
  tf_keras/utils/__init__.py,sha256=b7_d-USe_EmLo02_P99Q1rUCzKBYayPCfiYFStP-0nw,2735
607
607
  tf_keras/utils/experimental/__init__.py,sha256=DzGogE2AosjxOVILQBT8PDDcqbWTc0wWnZRobCdpcec,97
608
608
  tf_keras/utils/legacy/__init__.py,sha256=7ujlDa5HeSRcth2NdqA0S1P2-VZF1kB3n68jye6Dj-8,189
609
- tf_keras_nightly-2.18.0.dev2024081409.dist-info/METADATA,sha256=tzFoMHlE4v-R-DDHX9T3KUzqS73C55p9ncv9g_MP9FA,1638
610
- tf_keras_nightly-2.18.0.dev2024081409.dist-info/WHEEL,sha256=HiCZjzuy6Dw0hdX5R3LCFPDmFS4BWl8H-8W39XfmgX4,91
611
- tf_keras_nightly-2.18.0.dev2024081409.dist-info/top_level.txt,sha256=LC8FK7zHDNKxB17C6lGKvrZ_fZZGJsRiBK23SfiDegY,9
612
- tf_keras_nightly-2.18.0.dev2024081409.dist-info/RECORD,,
609
+ tf_keras_nightly-2.18.0.dev2024081509.dist-info/METADATA,sha256=TKI-EJU9TPhBHNDniZz5SNW7MiftYQg5uoeiGXHXyuU,1638
610
+ tf_keras_nightly-2.18.0.dev2024081509.dist-info/WHEEL,sha256=HiCZjzuy6Dw0hdX5R3LCFPDmFS4BWl8H-8W39XfmgX4,91
611
+ tf_keras_nightly-2.18.0.dev2024081509.dist-info/top_level.txt,sha256=LC8FK7zHDNKxB17C6lGKvrZ_fZZGJsRiBK23SfiDegY,9
612
+ tf_keras_nightly-2.18.0.dev2024081509.dist-info/RECORD,,