Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While working on the image kernels, I realized that it might be useful to have a unified class that sample the RGBD values jointly, so I'm introducing this utility class that takes in an color kernel (from #147) and a depth kernel (from #149) to create an RGBD kernel, which supports sample and logpdf computation.
This is a general class that's agnostic of the type of RGB and depth kernels -- it'll pass in the arguments it receives to both of the kernels during
sample
andlogpdf
call. Since both color and depth kernels have*args, **kwargs
as part of their function signature, they should simply ignore additional arguments that's not relevant to them.(I also just realized that I was referring to these classes as "kernels" but the actual class names are
*Distributions
... maybe I should fix these in a future PR.)I'm submitting this PR to
main
for now. Once I'm wrapping up my local changes, I'm going to work on resolving merge conflicts withgen3d
.Test Plan
Similar to the previous PRs, I've added some unit tests to make sure that the kernels roughly have the behaviors that we expected: