resnet-rs-keras
resnet-rs-keras copied to clipboard
Update tensorflow requirement from <2.10,>=2.4 to >=2.4,<2.11
Updates the requirements on tensorflow to permit the latest version.
Release notes
Sourced from tensorflow's releases.
TensorFlow 2.10.0
Release 2.10.0
Breaking Changes
- Causal attention in
keras.layers.Attention
andkeras.layers.AdditiveAttention
is now specified in thecall()
method via theuse_causal_mask
argument (rather than in the constructor), for consistency with other layers.- Some files in
tensorflow/python/training
have been moved totensorflow/python/tracking
andtensorflow/python/checkpoint
. Please update your imports accordingly, the old files will be removed in Release 2.11.tf.keras.optimizers.experimental.Optimizer
will graduate in Release 2.11, which meanstf.keras.optimizers.Optimizer
will be an alias oftf.keras.optimizers.experimental.Optimizer
. The currenttf.keras.optimizers.Optimizer
will continue to be supported astf.keras.optimizers.legacy.Optimizer
, e.g.,tf.keras.optimizers.legacy.Adam
. Most users won't be affected by this change, but please check the API doc if any API used in your workflow is changed or deprecated, and make adaptions. If you decide to keep using the old optimizer, please explicitly change your optimizer totf.keras.optimizers.legacy.Optimizer
.- RNG behavior change for
tf.keras.initializers
. Keras initializers will now use stateless random ops to generate random numbers.
- Both seeded and unseeded initializers will always generate the same values every time they are called (for a given variable shape). For unseeded initializers (
seed=None
), a random seed will be created and assigned at initializer creation (different initializer instances get different seeds).- An unseeded initializer will raise a warning if it is reused (called) multiple times. This is because it would produce the same values each time, which may not be intended.
Deprecations
- The C++
tensorflow::Code
andtensorflow::Status
will become aliases of respectivelyabsl::StatusCode
andabsl::Status
in some future release.
- Use
tensorflow::OkStatus()
instead oftensorflow::Status::OK()
.- Stop constructing
Status
objects fromtensorflow::error::Code
.- One MUST NOT access
tensorflow::errors::Code
fields. Accessingtensorflow::error::Code
fields is fine.
- Use the constructors such as
tensorflow::errors:InvalidArgument
to create status using an error code without accessing it.- Use the free functions such as
tensorflow::errors::IsInvalidArgument
if needed.- In the last resort, use e.g.
static_cast<tensorflow::errors::Code>(error::Code::INVALID_ARGUMENT)
orstatic_cast<int>(code)
for comparisons.tensorflow::StatusOr
will also become in the future alias toabsl::StatusOr
, so useStatusOr::value
instead ofStatusOr::ConsumeValueOrDie
.Major Features and Improvements
tf.lite
:
- New operations supported:
- tflite SelectV2 now supports 5D.
- tf.einsum is supported with multiple unknown shapes.
- tf.unsortedsegmentprod op is supported.
- tf.unsortedsegmentmax op is supported.
- tf.unsortedsegmentsum op is supported.
- Updates to existing operations:
- tfl.scatter_nd now supports I1 for update arg.
- Upgrade Flatbuffers v2.0.5 from v1.12.0
tf.keras
:
EinsumDense
layer is moved from experimental to core. Its import path is moved fromtf.keras.layers.experimental.EinsumDense
totf.keras.layers.EinsumDense
.- Added
tf.keras.utils.audio_dataset_from_directory
utility to easily generate audio classification datasets from directories of.wav
files.- Added
subset="both"
support intf.keras.utils.image_dataset_from_directory
,tf.keras.utils.text_dataset_from_directory
, andaudio_dataset_from_directory
, to be used with thevalidation_split
argument, for returning both dataset splits at once, as a tuple.- Added
tf.keras.utils.split_dataset
utility to split aDataset
object or a list/tuple of arrays into twoDataset
objects (e.g. train/test).- Added step granularity to
BackupAndRestore
callback for handling distributed training failures & restarts. The training state can now be restored at the exact epoch and step at which it was previously saved before failing.- Added
tf.keras.dtensor.experimental.optimizers.AdamW
. This optimizer is similar as the existingkeras.optimizers.experimental.AdamW
, and works in the DTensor training use case.- Improved masking support for
tf.keras.layers.MultiHeadAttention
.
- Implicit masks for
query
,key
andvalue
inputs will automatically be used to compute a correct attention mask for the layer. These padding masks will be combined with anyattention_mask
passed in directly when calling the layer. This can be used withtf.keras.layers.Embedding
withmask_zero=True
to automatically infer a correct padding mask.- Added a
use_causal_mask
call time arugment to the layer. Passinguse_causal_mask=True
will compute a causal attention mask, and optionally combine it with anyattention_mask
passed in directly when calling the layer.
... (truncated)
Changelog
Sourced from tensorflow's changelog.
Release 2.10.0
Breaking Changes
- Causal attention in
keras.layers.Attention
andkeras.layers.AdditiveAttention
is now specified in thecall()
method via theuse_causal_mask
argument (rather than in the constructor), for consistency with other layers.- Some files in
tensorflow/python/training
have been moved totensorflow/python/tracking
andtensorflow/python/checkpoint
. Please update your imports accordingly, the old files will be removed in Release 2.11.tf.keras.optimizers.experimental.Optimizer
will graduate in Release 2.11, which meanstf.keras.optimizers.Optimizer
will be an alias oftf.keras.optimizers.experimental.Optimizer
. The currenttf.keras.optimizers.Optimizer
will continue to be supported astf.keras.optimizers.legacy.Optimizer
, e.g.,tf.keras.optimizers.legacy.Adam
. Most users won't be affected by this change, but please check the API doc if any API used in your workflow is changed or deprecated, and make adaptions. If you decide to keep using the old optimizer, please explicitly change your optimizer totf.keras.optimizers.legacy.Optimizer
.- RNG behavior change for
tf.keras.initializers
. Keras initializers will now use stateless random ops to generate random numbers.
- Both seeded and unseeded initializers will always generate the same values every time they are called (for a given variable shape). For unseeded initializers (
seed=None
), a random seed will be created and assigned at initializer creation (different initializer instances get different seeds).- An unseeded initializer will raise a warning if it is reused (called) multiple times. This is because it would produce the same values each time, which may not be intended.
Deprecations
- The C++
tensorflow::Code
andtensorflow::Status
will become aliases of respectivelyabsl::StatusCode
andabsl::Status
in some future release.
- Use
tensorflow::OkStatus()
instead oftensorflow::Status::OK()
.- Stop constructing
Status
objects fromtensorflow::error::Code
.- One MUST NOT access
tensorflow::errors::Code
fields. Accessingtensorflow::error::Code
fields is fine.
- Use the constructors such as
tensorflow::errors:InvalidArgument
to create status using an error code without accessing it.- Use the free functions such as
tensorflow::errors::IsInvalidArgument
if needed.- In the last resort, use e.g.
static_cast<tensorflow::errors::Code>(error::Code::INVALID_ARGUMENT)
orstatic_cast<int>(code)
for comparisons.tensorflow::StatusOr
will also become in the future alias toabsl::StatusOr
, so useStatusOr::value
instead ofStatusOr::ConsumeValueOrDie
.Major Features and Improvements
tf.lite
:
- New operations supported:
- tflite SelectV2 now supports 5D.
- tf.einsum is supported with multiple unknown shapes.
- tf.unsortedsegmentprod op is supported.
- tf.unsortedsegmentmax op is supported.
- tf.unsortedsegmentsum op is supported.
- Updates to existing operations:
- tfl.scatter_nd now supports I1 for update arg.
- Upgrade Flatbuffers v2.0.5 from v1.12.0
tf.keras
:
EinsumDense
layer is moved from experimental to core. Its import path is moved fromtf.keras.layers.experimental.EinsumDense
totf.keras.layers.EinsumDense
.- Added
tf.keras.utils.audio_dataset_from_directory
utility to easily generate audio classification datasets from directories of.wav
files.- Added
subset="both"
support intf.keras.utils.image_dataset_from_directory
,tf.keras.utils.text_dataset_from_directory
, andaudio_dataset_from_directory
, to be used with thevalidation_split
argument, for returning both dataset splits at once, as a tuple.- Added
tf.keras.utils.split_dataset
utility to split aDataset
object or a list/tuple of arrays into twoDataset
objects (e.g. train/test).- Added step granularity to
BackupAndRestore
callback for handling distributed training failures & restarts. The training state can now be restored at the exact epoch and step at which it was previously saved before failing.- Added
tf.keras.dtensor.experimental.optimizers.AdamW
. This optimizer is similar as the existingkeras.optimizers.experimental.AdamW
, and works in the DTensor training use case.- Improved masking support for
tf.keras.layers.MultiHeadAttention
.
- Implicit masks for
query
,key
andvalue
inputs will automatically be used to compute a correct attention mask for the layer. These padding masks will be combined with anyattention_mask
passed in directly when calling the layer. This can be used withtf.keras.layers.Embedding
withmask_zero=True
to automatically infer a correct padding mask.- Added a
use_causal_mask
call time arugment to the layer. Passinguse_causal_mask=True
will compute a causal attention mask, and optionally combine it with anyattention_mask
passed in directly when calling the layer.- Added
ignore_class
argument in the lossSparseCategoricalCrossentropy
and metricsIoU
andMeanIoU
, to specify a class index to be ignored during loss/metric computation (e.g. a background/void class).- Added
tf.keras.models.experimental.SharpnessAwareMinimization
. This class implements the sharpness-aware minimization technique, which boosts model performance on various tasks, e.g., ResNet on image classification.
... (truncated)
Commits
359c3cd
Merge pull request #57609 from tensorflow/vinila21-patch-6724308f
Update estimator and keras version in TF 2.10 branch for 2.10.0.203b333
Merge pull request #57608 from tensorflow-jenkins/version-numbers-2.10.0-28960cd950ff
Update version numbers to 2.10.09b13e9e
Merge pull request #57510 from tensorflow/vinila21-patch-1ba47bc7
Update release notes with security updatesf082fa9
Merge pull request #57464 from tensorflow/r2.10-b5f6fbfba7660ed7ce
Re-enable testTensorListReserveWithNonScalarNumElements to work with mlir as ...23cb0d3
Merge pull request #57460 from tensorflow/revert-57075-r2.10-e9863e9a9cbf419a41
Revert "r2.10 cherry-pick: e9863e9a9cb "Fix tf.raw_ops.EmptyTensorList vulner...- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
-
@dependabot rebase
will rebase this PR -
@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it -
@dependabot merge
will merge this PR after your CI passes on it -
@dependabot squash and merge
will squash and merge this PR after your CI passes on it -
@dependabot cancel merge
will cancel a previously requested merge and block automerging -
@dependabot reopen
will reopen this PR if it is closed -
@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually -
@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)