-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0d786c7
commit 4ba2714
Showing
3 changed files
with
41 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4ba2714
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to check: When talking about a 2D state representation (where the 3rd can be a batch dim - but I'll leave the batch dim implied in the following), there are two different use cases with the same mathematical behaviour here.
Case 1: Where the sample is an image, where neither of the two image dims are privileged over the other. You would typically diffuse pixels all with the same t (although sometimes you might want a different t for each pixel), and if you mask part of the image, the mask needs to be 2D.
Case 2: Where the sample is a vector-valued sequence. Eg. a point in Euc space. So each column of the 2D matrix is a single vector valued observation, and your time is either a scalar, or a row vector, but never a full matrix, and your mask is a row vector.
I haven't looked in detail, but I just want to check that you haven't made case 2 easier to work with, but lost case 1. Also, would it make things easier to just make these different types? OrnsteinUhlenbeckDiffusion and OrnsteinUhlenbeckVectorDiffusion, or something like that?
4ba2714
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This branch is still work-in-progress, and the final change will be different.
My main idea is that we always represent the whole state as a multidimensional array of states, where each element represents a single state.
So if the sample is an image, the array will be a 2d array, where each element is an pixel, and when you batch multiple images, the array will have an additional dimension at the end.
If the sample is a vector-valued sequence, the array will be a 1d array, where each element is a vector to represent a state, and you can batch these arrays with an additional dimension in the same way as images.
Time is either a scalar or a 1d array (vector), the length of which must match the last dimension (which is for batching) of the state array.
In this idea, the masking array will always have the same shape as the state array, which imo simplifies the interface of the package.
Separating types might simplify the code, but I guess it'll result in a bunch of copy-and-pastings of the same code.