Comments (2)
When I change from th.tensor([0.0, 1.0]), dt=0.01
to th.tensor([0.0, 5.0]), dt=0.05
.
from torchsde.
So this is a bit weird! In particular because one tends to imagine a BrownianInterval
being scale-invariant. I've been able to figure out why this happens, but I don't have a fix in mind yet.
The reason has to do with the binary tree heuristic built in to the BrownianInterval
. Once >100 queries have been made, the BrownianInterval
averages the step sizes it has observed over those queries, and uses those as an estimate of the average step size for the rest of the SDE solve. This is used to build up a binary tree, as per Section E.2, "Backward pass" of the paper. (Which I refer to as it sounds like you've read it.)
The dt=0.01
case makes 101 steps, which triggers the calculation of this heuristic. Evaluating that heuristic (building up the binary tree) is what takes up so much time. The other cases make only 100 steps, and the solve actually completes before the heuristic even triggers.
Why different number of steps between these apparently-scale-invariant cases? Floating point inaccuracies:
>>> import torch
>>> x = torch.tensor(0.01)
>>> sum = 0
>>> for _ in range(100):
... sum = sum + x
...
>>> sum
tensor(1.0000)
>>> sum < 1
tensor(True)
The real bug here is simply that the heuristic takes so much time to compute. I'll need to have a deeper look, later, to figure out what might be done to resolve this.
from torchsde.
Related Issues (20)
- vector-valued SDE cumbersome workflow HOT 1
- Zero drift and zero diffusion matrices lead to non-zero changes of variable
- Irregular data and sampling posterior in latent_sde_lorenz.py
- Low CPU and GPU usage in training sde_gan, Seeking Help to Improve Performance. HOT 2
- Different `t` for data in a minibatch HOT 5
- torchsde pypi package is misformated HOT 27
- Deprecation torchsde version HOT 5
- Something went wrong Expecting value: line 1 column 1 (char 0) HOT 1
- Incorporating real stock time series data
- SDE-LSTM structure for time series forecasting
- Performance Improvement Inquiry: Experiencing Slow Execution with TorchSDE HOT 2
- Latent SDE failed to generate longer samples
- issue with my text to image ai Device type privateuseone is not supported for torch.Generator() api. HOT 1
- 我的 Mac上 只有torchsde-0.2.6.dist-info,怎样才能安装insightface
- 如果 torchsde 当前没有解决这个问题的新版本,你可以联系该项目的维护者或作者
- sdeint_adjoint for f_and_g_prod type SDE, how to set parameter?
- failure to install pip install qiskit-aer to run qsvm on ibm simulator
- learning the generative model of periodical process HOT 1
- extra_solver_state Documentation HOT 1
- WARNING: Error parsing dependencies of torchsde HOT 1
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 torchsde.