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

how to get back original state and size #3

Open
ramdhan1989 opened this issue Nov 20, 2024 · 3 comments
Open

how to get back original state and size #3

ramdhan1989 opened this issue Nov 20, 2024 · 3 comments

Comments

@ramdhan1989
Copy link

Hi,
I tried to run cvit_4x4 for navier stoke problem. I would like to know how to get the original state or size of 128 by 128 while the num_querry_point is 1024?

thanks

@sifanexisted
Copy link
Collaborator

Apologies for the delayed response. To clarify, the "4x4" refers to the patch size, and the model is trained on images with a resolution of 128x128.

@ramdhan1989
Copy link
Author

Hi,
I just want to clarify from eval.py, is the code here will give me the result of 128,128, 3 (height, width, channel)? from my test, the model output is 1024, 3 (num querry point, channel)

l2_error_list = []
for batch in test_loader:
batch = jax.tree_map(lambda x: jnp.array(x), batch)
x, y = batch
pred = model.apply(state.params, x, coords)
pred = pred.reshape(-1, 1, h, w, c)

or

pred = rollout(
state,
x,
coords,
prev_steps=config.dataset.prev_steps,
pred_steps=config.dataset.pred_steps,
rollout_steps=config.eval.rollout_steps,
)

thanks

@sifanexisted
Copy link
Collaborator

I think you need to ensure the provided coords is a flattened grid.

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