DeepONet Project Update: Model Accessibility and Checkpoint Restoration Fix#47
DeepONet Project Update: Model Accessibility and Checkpoint Restoration Fix#47parsa-rahbari-82 wants to merge 23 commits intolululxvi:masterfrom
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.
Keep this file as the original one.
There was a problem hiding this comment.
@AmirAliFakhari It seems the file roolls back to the wrong version.
There was a problem hiding this comment.
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.
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.
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.
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.
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.
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.
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: