New pytree via sampling leaves of original pytree #12040
Answered
by
jakevdp
pharringtonp19
asked this question in
Q&A
-
Aim: Given a pytree, I would like to construct a new pytree by sampling from the leaves of the given pytree I was thinking that something like the following might work. I'm not sure though how to derive a new
|
Beta Was this translation helpful? Give feedback.
Answered by
jakevdp
Aug 22, 2022
Replies: 1 comment 3 replies
-
I think we need more information here: what is the expected structure of your output? e.g. say |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
pharringtonp19
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think we need more information here: what is the expected structure of your output? e.g. say
tree
is a a nested dict of dicts, and you samplen
of the leaf values. What should the output look like?