how to re-use same object on different parts of a LazyCall object #3878
Unanswered
aldopareja
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When using
LazyCall
andinstantiate
an instantiation creates different objects for each new target. Sometimes it is helpful to reuse the object on different parts of a higher scope. A good example would be siamese networks or self-play.This code could be a good example. Here, the model for the visualizer would be a different object than for the trainer at instantiation time.
I could solve this by having an
instantiate
at a wrapper class and then reusing the instantiated object. Still, I think instantiating an object and making it transparent for the user would be better.Beta Was this translation helpful? Give feedback.
All reactions