benmoseley / seismic-simulation-complex-media

This repository reproduces the results of the paper "Deep learning for fast simulation of seismic waves in complex media" (B. Moseley et al, 2020, Solid Earth)
MIT License
43 stars 20 forks source link

Help Needed: InvalidArgumentError When Reading Binary Data for SeismicWaveNet Training #2

Open scout7777758 opened 4 months ago

scout7777758 commented 4 months ago

Dear Prof. Moseley,

I would like to express my gratitude for your contributions to the seismic data processing and WaveNet model training. Your work has been incredibly inspiring for me in the field.

I've encountered an issue while trying to run the main.py script in the seismic-simulation-complex-media/wavenet directory to train the SeismicWaveNet model. The script encounters a tensorflow.python.framework.errors_impl.InvalidArgumentError when attempting to read data from the generated binary file ../generate_data/20240412/data/layers_2ms.bin. The error message indicates that the file size (680,400,000 bytes) is not an exact multiple of the expected record length (25,032 bytes).

I have verified the calculation of the record length as defined in the SeismicDataset class within datasets.py, but am still unable to resolve this issue. Here is the specific error message I am encountering:

tensorflow.python.framework.errors_impl.InvalidArgumentError: Excluding the header (0 bytes) and footer (0 bytes), input file "../generate_data/20240412/data/layers_2ms.bin" has body length 680400000 bytes, which is not an exact multiple of the record length (25032 bytes).

[[node SeismicDataset/IteratorGetNext_2 (defined at /root/autodl-tmp/seismic-simulation-complex-media/wavenet/datasets.py:73) ]]**

Could you possibly offer any advice or solutions to address this problem? I would greatly appreciate any help or guidance you can provide.

Thank you once again for your contributions and assistance.

Best regards

benmoseley commented 4 months ago

Have you tried using an earlier version of Tensorflow? The code was written for version 1.14.0 (i.e. a fairly long time ago)