-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Description
Hi Lu,
I am running your code for example of darcy_rectangular_pwc. I note that in your paper, you used hard constraints, as mentioned, "We use the coefficient 20 such that 20x(1−x)y(1−y) is of order 1 for x ∈ [0, 1] and y ∈ [0, 1]." I want to add it.
Then, I write the following code
def output_transform(inputs, output):
x_loc = inputs[1]
x1, x2 = x_loc[:, 0:1], x_loc[:, 1:2]
final_output = x1 * x2 * (1 - x1) * (1 - x2) * output * 20
return final_output
net.apply_output_transform(output_transform)
However, it does not work for me.
"File "/public/home/hpc214801033/DeepONet/Darcy/src/BVx_H/deeponet_BVx_H.py", line 82, in output_transform
final_output = x1 * x2 * (1 - x1) * (1 - x2) * (y * std + scaler.mean_.astype(np.float32))
File "/public/home/hpc214801033/.conda/envs/tensorflow2.91/lib/python3.10/site-packages/tensorflow/python/util/traceback_utils.py", line 150, in error_handler
return fn(*args, **kwargs)"
What happens to this?
Best regards,
Peng
Metadata
Metadata
Assignees
Labels
No labels