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

AttributeError: 'Triple' object has no attribute 'transform_inputs' #16

Closed
cfd-ai opened this issue Jan 29, 2022 · 2 comments
Closed

AttributeError: 'Triple' object has no attribute 'transform_inputs' #16

cfd-ai opened this issue Jan 29, 2022 · 2 comments

Comments

@cfd-ai
Copy link

cfd-ai commented Jan 29, 2022

Any idea how to resolve the following error?
This is for the default problem = "ode" test case.
Backend: tensorflow.compat.v1
TensorFlow version: 2.6.2
Thanks.

Restoring model from model/model.ckpt-37000.ckpt ...

Traceback (most recent call last):
File "deeponet_pde.py", line 285, in
main()
File "deeponet_pde.py", line 281, in main
run(problem, system, space, T, m, nn, net, lr, epochs, num_train, num_test)
File "deeponet_pde.py", line 177, in run
safe_test(model, data, X_test, y_test)
File "/[HOME-PATH]/tests/deeponet/src/utils.py", line 56, in safe_test
y_pred.append(model.predict(data.transform_inputs(X_add)))
AttributeError: 'Triple' object has no attribute 'transform_inputs'

@cfd-ai
Copy link
Author

cfd-ai commented Jan 30, 2022

If I understand correctly, I guess something like this would fix it:

    # Network
    nn = "DeepONet" #OpNN
    if nn == "DeepONet":
        y_pred.append(model.predict(X_add))
    else:
        y_pred.append(model.predict(data.transform_inputs(X_add)))

@lululxvi
Copy link
Owner

lululxvi commented Jan 30, 2022

You are right.

Also see #14 (comment)

@cfd-ai cfd-ai closed this as completed Feb 10, 2022
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

No branches or pull requests

2 participants