Skip to content

How can I sample continuous transitions #21

Answered by ymd-h
heyuanYao-pku asked this question in Q&A
Discussion options

You must be logged in to vote

@heyuanYao-pku
Hi, thank you for your feed backs.

I don't find any convenient ways, but there are workarounds.


Option 1:
You can transform to $n$-length batch shape before adding.
Additional local buffer can be used, however, if you want to utilize stack_compress option, stack dimension must be the last dimension.
https://ymd_h.gitlab.io/cpprb/features/memory_compression/


Option 2:
You can use private method _encode_sample, which takes index.
You might generate random number outside, or slide PER indices after sampling.

Note:
_encode_sample is private method and not guaranteed within API compatibility, however, I know some users use the method, so that we don't change without enough rea…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ymd-h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants