Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeepONet Project Update: Model Accessibility and Checkpoint Restoration Fix #47

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

parsa-rahbari-82
Copy link

Description:

This pull request provides a series of important updates to the DeepONet project, primarily focusing on improving model accessibility and bug fixes. The following changes have been made:

  1. Command-Line Model Parameters:

    • Added command-line arguments to give users more control over the model configuration without needing to modify the source code directly.
    • Users can now adjust critical parameters such as learning rate, number of sensors, and training epochs via the command line using Python's argparse library.

    Example usage:

    python deeponet_pde.py -p ode -m 200 --num-train 10000 --num-test 3000--lr 1e-3 --epochs 50000 --nn deeponet --activation relu --init Glorot --stacked False

  2. Checkpoint Restoration Bug Fix:

    • Resolved a bug related to restoring checkpoints, which was caused by an incorrect file path.
    • The model can now properly restore from saved states for both training and inference.
  3. Legendre Transform Flexibility:

    • Replaced the hardcoded time value (T=2) with a dynamic time variable.
    • This update ensures that the model can work with any time interval, providing flexibility and preventing extrapolation errors.
  4. Compatibility with DeepONet’s Dynamic Systems:

    • Updated the structure of X_train and ensured proper formatting for X_test to be compatible with TensorFlow's compat.v1 backend.
    • Added necessary changes to avoid type mismatch errors, such as casting arrays in X_test to np.float32.

    Example code snippet:

X_test = tuple([arr.astype(dtype=np.float32) for arr in X_test])

Testing:

These changes have been thoroughly tested and confirmed to work reliably with TensorFlow's compat.v1 backend.

MIND Lab:

  • Supervisor: Dr. Mostafa Abbaszadeh
    Team:
    • AmirAli Fakhari Zavareh
    • Melika Taheri Soufi
    • Parsa Rahbari

.gitignore Outdated Show resolved Hide resolved
src/deeponet_pde.py Outdated Show resolved Hide resolved
src/system.py Outdated Show resolved Hide resolved
@parsa-rahbari-82
Copy link
Author

Dear Dr. Lu
Thanks for the review! I’ve addressed the points you raised:

  • Redundant python 2 removed.
  • .gitignore file removed.
  • Using original order of import.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants