How can I sample continuous transitions #21
-
I'm writing a custom training process, which is autoregressive . And it needs to sample |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Or perhaps, is there a convenient way to sample from buffer with a custom function? |
Beta Was this translation helpful? Give feedback.
-
@heyuanYao-pku I don't find any convenient ways, but there are workarounds. Option 1: Option 2: Note: FYI: For online periodical roll out, some users utilize |
Beta Was this translation helpful? Give feedback.
@heyuanYao-pku
Hi, thank you for your feed backs.
I don't find any convenient ways, but there are workarounds.
Option 1:$n$ -length batch shape before adding.
You can transform to
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…