-
Notifications
You must be signed in to change notification settings - Fork 230
Closed
Description
The target of this proposal is to reduce the memory used for storing the theta history as less as possible. Let's say θ is the variables which are associated with the sampler.
Key points:
- Sampler only changes and keep a track of the θ but not VarInfo.
- VarInfo is only treated as a layer that sampler uses to interact with model.
- Each time sampler want to apply θ to the model, it firstly pass θ to VarInfo, and run the model with VarInfo and sampler.
- It's sampler's responsibility to use the correct θ (e.g. use an old θ if a previous step is rejected) when evaluating the model.
- When passing VarInfo to another sampler, all the sampler need to do is
vi[spl] = θand pass thisvito the other sampler.
- During the process of one sampler, it will never change values belong to other samplers in this case because
vi[spl] = θwill not interact other space.
Running model is like
evalute(θ, model, spl, vi) = begin
vi[spl] = θ
model(vi=vi, sampler=spl)
end
Layer concept is like
---------------------------------
| Model | ----------> Sample
---------------------------------
↑ ↑
------------------- ↑
| VarInfo | ↑
------------------- ↑
↑ ↑
------------------- ↑
| Sampler | <------
-------------------
Metadata
Metadata
Assignees
Labels
No labels