-
Notifications
You must be signed in to change notification settings - Fork 183
DeepONet Project Update: Model Accessibility and Checkpoint Restoration Fix #47
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
base: master
Are you sure you want to change the base?
Conversation
This reverts commit 38260b9.
|
Dear Dr. Lu
|
|
I reordered imports according to PEP 8 guidelines. |
- .gitignore - requirements.txt
| @@ -1,8 +0,0 @@ | |||
| deepxde | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep this file as the original one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AmirAliFakhari It seems the file roolls back to the wrong version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dear Mr. Lu Lu,
I hope you're doing well. I've been working on the DeepONet project for the past few months and truly appreciate your feedback throughout the process.
To help streamline the next steps and avoid back-and-forth revisions, would it be possible for you to share a complete list of the issues or changes you'd like to see in the current version? This would really help me address everything thoroughly and ensure that the final result meets your expectations.
|
|
||
| import deepxde as dde | ||
| import numpy as np | ||
| import tensorflow as tf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import argparse
import deepxde as dde
import itertools
import numpy as np
import tensorflow as tf
| from spaces import FinitePowerSeries, FiniteChebyshev, GRF | ||
| from system import LTSystem, ODESystem, DRSystem, CVCSystem, ADVDSystem | ||
| from utils import merge_values, trim_to_65535, mean_squared_error_outlier, safe_test | ||
| from spaces import GRF, FiniteChebyshev, FinitePowerSeries |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from spaces import FiniteChebyshev, FinitePowerSeries, GRF
| X_test = merge_values(X_test) | ||
| y_pred = model.predict(data.transform_inputs(X_test)) | ||
| X_test = tuple([arr.astype(dtype=np.float32) for arr in X_test]) | ||
| y_pred = model.predict(X_test) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why no data.transform_inputs? This is for data normalization.
| # Gravity pendulum | ||
| # k = 1 | ||
| # return [s[1], - k * np.sin(s[0]) + u] | ||
| k = 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is return in line 108. The code here is not used.
| from __future__ import print_function | ||
|
|
||
| import numpy as np | ||
| import config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
config is a local file. Move it below as the original code.
|
|
||
| import sys | ||
| import time | ||
| import numpy as np |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the original import format for numpy
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:
Command-Line Model Parameters:
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 FalseCheckpoint Restoration Bug Fix:
Legendre Transform Flexibility:
Compatibility with DeepONet’s Dynamic Systems:
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:
Team: