From ab1ddd7ea0a762f50aef79b79f7375c5453c8abd Mon Sep 17 00:00:00 2001 From: Agniv Sarkar Date: Thu, 20 Jun 2024 20:45:06 -0700 Subject: [PATCH] Update version of TF (#1784) --- README.md | 2 +- deepxde/backend/tensorflow/tensor.py | 4 ++-- docs/user/installation.rst | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 62a45e50e..07bb99d5c 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ All the components of DeepXDE are loosely coupled, and thus DeepXDE is well-stru DeepXDE requires one of the following backend-specific dependencies to be installed: - TensorFlow 1.x: [TensorFlow](https://www.tensorflow.org)>=2.7.0 -- TensorFlow 2.x: [TensorFlow](https://www.tensorflow.org)>=2.2.0, [TensorFlow Probability](https://www.tensorflow.org/probability)>=0.10.0 +- TensorFlow 2.x: [TensorFlow](https://www.tensorflow.org)>=2.3.0, [TensorFlow Probability](https://www.tensorflow.org/probability)>=0.10.0 - PyTorch: [PyTorch](https://pytorch.org)>=1.9.0 - JAX: [JAX](https://jax.readthedocs.io), [Flax](https://flax.readthedocs.io), [Optax](https://optax.readthedocs.io) - PaddlePaddle: [PaddlePaddle](https://www.paddlepaddle.org.cn/en)>=2.6.0 diff --git a/deepxde/backend/tensorflow/tensor.py b/deepxde/backend/tensorflow/tensor.py index 5fcf8c7cc..8e4cbba4a 100644 --- a/deepxde/backend/tensorflow/tensor.py +++ b/deepxde/backend/tensorflow/tensor.py @@ -5,8 +5,8 @@ import tensorflow_probability as tfp -if Version(tf.__version__) < Version("2.2.0"): - raise RuntimeError("DeepXDE requires TensorFlow>=2.2.0.") +if Version(tf.__version__) < Version("2.3.0"): + raise RuntimeError("DeepXDE requires TensorFlow>=2.3.0.") if Version(tfp.__version__) < Version("0.10.0"): raise RuntimeError("DeepXDE requires TensorFlow Probability>=0.10.0.") diff --git a/docs/user/installation.rst b/docs/user/installation.rst index da09775f8..5bab4f10d 100644 --- a/docs/user/installation.rst +++ b/docs/user/installation.rst @@ -7,7 +7,7 @@ Installation DeepXDE requires one of the following backend-specific dependencies to be installed: - TensorFlow 1.x: `TensorFlow `_>=2.7.0 -- TensorFlow 2.x: `TensorFlow `_>=2.2.0, `TensorFlow Probability `_>=0.10.0 +- TensorFlow 2.x: `TensorFlow `_>=2.3.0, `TensorFlow Probability `_>=0.10.0 - PyTorch: `PyTorch `_>=1.9.0 - JAX: `JAX `_, `Flax `_, `Optax `_ - PaddlePaddle: `PaddlePaddle `_>=2.6.0 @@ -96,7 +96,7 @@ Here is a comparison between different backends: TensorFlow 1.x backend `````````````````````` -Export ``DDE_BACKEND`` as ``tensorflow.compat.v1`` to specify TensorFlow 1.x backend. The required TensorFlow version is 2.2.0 or later. Essentially, TensorFlow 1.x backend uses the API `tensorflow.compat.v1 `_ in TensorFlow 2.x and disables the eager execution: +Export ``DDE_BACKEND`` as ``tensorflow.compat.v1`` to specify TensorFlow 1.x backend. Essentially, TensorFlow 1.x backend uses the API `tensorflow.compat.v1 `_ in TensorFlow 2.x and disables the eager execution: .. code:: python @@ -108,12 +108,12 @@ In addition, DeepXDE will set ``TF_FORCE_GPU_ALLOW_GROWTH`` to ``true`` to preve TensorFlow 2.x backend `````````````````````` -Export ``DDE_BACKEND`` as ``tensorflow`` to specify TensorFlow 2.x backend. The required TensorFlow version is 2.2.0 or later. In addition, DeepXDE will set ``TF_FORCE_GPU_ALLOW_GROWTH`` to ``true`` to prevent TensorFlow take over the whole GPU memory. +Export ``DDE_BACKEND`` as ``tensorflow`` to specify TensorFlow 2.x backend. In addition, DeepXDE will set ``TF_FORCE_GPU_ALLOW_GROWTH`` to ``true`` to prevent TensorFlow take over the whole GPU memory. PyTorch backend ``````````````` -Export ``DDE_BACKEND`` as ``pytorch`` to specify PyTorch backend. The required PyTorch version is 1.9.0 or later. In addition, if GPU is available, DeepXDE will set the default tensor type to cuda, so that all the tensors will be created on GPU as default: +Export ``DDE_BACKEND`` as ``pytorch`` to specify PyTorch backend. In addition, if GPU is available, DeepXDE will set the default tensor type to cuda, so that all the tensors will be created on GPU as default: .. code:: python