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

RuntimeError: shape '[1000, 1024, 1]' is invalid for input of size 8192000 #6

Closed
dbl001 opened this issue Nov 3, 2020 · 2 comments
Closed

Comments

@dbl001
Copy link

dbl001 commented Nov 3, 2020

I tried running the file fourier_1d.py:

$ python fourier_1d.py 
Traceback (most recent call last):
  File "fourier_1d.py", line 161, in <module>
    x_train = torch.cat([x_train.reshape(ntrain,s,1), grid.repeat(ntrain,1,1)], dim=2)
RuntimeError: shape '[1000, 1024, 1]' is invalid for input of size 8192000

This statement is generating the exception:

x_train.reshape(ntrain,s,1)

From the documentation of view() method, 'The returned tensor shares the same data and must have the same number of elements, but may have a different size.'

Screen Shot 2020-11-03 at 11 20 09 AM

Ideas?

@iamcalvinlau
Copy link

I made the assumption that he meant to have it as

sub = 2**3 #subsampling rate
h = 2**13 // sub
s = h

but I don't know if that is really the case.

@zongyi-li
Copy link
Collaborator

That's right. The raw data of the Burgers equation has resolution 8192. You can downsample it to the desired resolution.

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

3 participants