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

Number of elements does not match error for the test_data set #78

Open
DR-LHX opened this issue Oct 11, 2023 · 5 comments
Open

Number of elements does not match error for the test_data set #78

DR-LHX opened this issue Oct 11, 2023 · 5 comments

Comments

@DR-LHX
Copy link

DR-LHX commented Oct 11, 2023

When I tried the test_data sac.csv and sac folder files, I encountered the following error:

tensorflow.python.framework.errors_impl.InvalidArgumentError:Cannot add tensor to the batch: number of elements does not match. Shapes are: [tensor]: [18001,1,3],batch]: [180001,3]

How to solve this error problem? Is it because the input sac file contains only 18000 points?

Another question is whether this trained model fits for other seismic waveform containing different numbers of data points? I read from the paper that the model is trained under the waveform of 3000 points(30s and 100Hz)?

@napatt2
Copy link

napatt2 commented Oct 12, 2023

Maybe you could add --batch_size=1.

@DR-LHX
Copy link
Author

DR-LHX commented Oct 12, 2023

Maybe you could add --batch_size=1.

Thanks very much for the reply. This suggestion works fine and right now I can run the test_data set. Another question is that the test data (waveform) has a length of 18000 points. The trained model is based on data sets with 3000 points and my data set has another different number of points in each seismic file. Can the prediction model still apply to my datasets and should I change the format of the datasets?

@zhuwq0
Copy link
Contributor

zhuwq0 commented Oct 12, 2023

Thanks @napatt2. Yes, you can apply to a long sequence of data @DR-LHX .

@DR-LHX
Copy link
Author

DR-LHX commented Oct 12, 2023

Thanks @napatt2. Yes, you can apply to a long sequence of data @DR-LHX .

Thanks, Dr. Zhu. May I ask if the model can be applied to 1 component seismic data, e.g. data contains z direction only. I saw the training data and test data in the model contain 3 components.

@zhuwq0
Copy link
Contributor

zhuwq0 commented Oct 13, 2023

Yes, you can use 1 component data, but the performance will reduce, particular for S wave.

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