Comments (5)
Dear Abdullah,
I am delighted to hear that you enjoy Deepwave, but sorry that you experienced a problem with it. Thank you for taking the time to report it.
I have unfortunately not yet been able to reproduce the issue: I replaced the line nt = int(2 / dt) in the example with nt = int(1.5 / dt), but did not receive an error. Would it be possible for you to create and share a Colaboratory notebook where the error occurs?
-Alan
from deepwave.
Hi Alan,
You are right, 1.5 works fine. The error occurs when I make nt=int(1.3/dt), sorry my bad I put the wrong number in the first comment.
Currently I cannot share a Colaboratory notebook, I think my workstation just broke down. I am connecting to it remotely and suddenly I cannot connect anymore, so I need to go there and check it out.
If you still cannot reproduce the error, let me know. I will try to fix my workstation and share the notebook.
- Abdullah
from deepwave.
Hi Abdullah,
Ah yes, I can reproduce the error with 1.3. This is in fact not caused by Deepwave, but by the normalization I use in the example. In the example I divide each receiver's recording by the maximum amplitude of that receiver as a demonstration of the kind of processing that you can add after wave propagation (and PyTorch will automatically calculate the effect it has on the gradient calculation). I was a bit careless, however, and didn't account for the possibility that a receiver could have zero amplitude at all times, in which case there will be a division by zero. You may fix it by replacing the line in the example code
batch_rcv_amps_pred_norm = batch_rcv_amps_pred / batch_rcv_amps_pred_max
with
batch_rcv_amps_pred_norm = batch_rcv_amps_pred / (batch_rcv_amps_pred_max.abs() + 1e-10)
Taking the absolute value of the maximum amplitude and adding 1e-10
in the denominator will ensure that the denominator is never zero, and so should solve the problem.
Thank you again for reporting this issue - I will fix the example code.
Please let me know if this resolves the problem for you.
-Alan
from deepwave.
Thank you,
Your solution work very well. I see where things went south.
Another solution can be to not normalizing the data, but the gradient. This is what I often do when I implement FWI. something like
mx = model.grad.abs().max()
model.grad = model.grad/mx
optimizer.step()
I just implement it and it worked, I do not know which one is more efficient though
Thank you again
from deepwave.
Excellent. Let me know if anything else goes wrong.
from deepwave.
Related Issues (20)
- cannot find -lcudart HOT 13
- CUDA out of memory when running Reverse-Time Migration of Marmousi example HOT 2
- ModuleNotFoundError: No module named 'deepwave' HOT 4
- optimizer selection question HOT 3
- TypeError: 'module' object is not callable HOT 9
- Asking for Propagator function in the newest version of Deepwave HOT 3
- Error in executing deepwave in MAC HOT 17
- How to calculate RTM using deepwave HOT 11
- Try the first-order acoustic equation propagation HOT 2
- scalar_born memory issue HOT 4
- 3D forward modelling HOT 5
- Incorrect output from DistributedDataParallel HOT 6
- It seams the scalar function cannot generate the ground roll when setting the free surface HOT 4
- Calculated Hessian for the elastic example. It gives zero values HOT 2
- I was unable to complete compilation HOT 5
- Apply deepwave to ultrasound HOT 13
- Generate the waveform data HOT 3
- How can I get the file called scalar2d_gpu_iso_4_float and scalar2d_gpu_iso_4_float.cp38-win_amd64 HOT 3
- How to write a propagator by scalar with the newest version HOT 3
- looked at the source code HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deepwave.