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

Add multi-input example #94

Closed
wants to merge 1 commit into from
Closed

Add multi-input example #94

wants to merge 1 commit into from

Conversation

jatkinson1000
Copy link
Member

Closes #13

  • Add Python components of WaveNet
  • Add fortran inference code
  • Ensure README and build instructions complete

Sorry, something went wrong.

@jatkinson1000 jatkinson1000 added documentation Improvements or additions to documentation enhancement New feature or request labels Mar 18, 2024
@jatkinson1000 jatkinson1000 self-assigned this Mar 18, 2024
@jatkinson1000 jatkinson1000 linked an issue Mar 18, 2024 that may be closed by this pull request
@jatkinson1000
Copy link
Member Author

I'm conscious that the weights are a binary and fairly large (3.0M).
We don't need them here as users have no ground truth to compare to, so could use random numbers for the weights...
However, it may be more "authentic" to leave as is with the pickled weights.
Thoughts appreciated.

Verified

This commit was signed with the committer’s verified signature. The key has expired.
addaleax Anna Henningsen
Copy link
Member

@surbhigoel77 surbhigoel77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Have left a couple of comments for minor changes.

# trace_to_torchscript(trained_model, trained_model_dummy_input, filename=saved_ts_filename)

# Load torchscript and run model as a test
testing_input_u = 2.0 * trained_model_dummy_input_u
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a line to why the input is scaled by a factor of 2

@@ -0,0 +1,136 @@
"""Load a pytorch model and convert it to TorchScript."""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could mention the methods included for torchscript conversion here (tracing and scripting), and that scripting is the recommended method

@@ -0,0 +1,2 @@
torch
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding minimum required versions would be good?

p_surf :
surface pressure (128, num_col)
Y_out :
output prellocated in MiMA (128, num_col, 40)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spelling of prelocated

@jatkinson1000
Copy link
Member Author

I am closing this as we now have other examples (e.g. MultiIO) in the examples suite that demonstrate this property, and this was using the old API anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Example for multiple inputs
2 participants