Closed chaoming0625 closed 1 year ago
Please:
The current brainpy transformations can only trace Variable outside these transformation functions. For example,
Variable
class A(): def __init__(self): self.a = bm.Variable(1) # can be traced @bm.cls_jit def f(self): self.b = bm.Variable(1) # cannot be traced self.a += self.b
This is in contrast to the OO transformations in Flax, which supports to trace Variables inside of a transformation function.
It may be essential to support Variable tracing during a computation.
Has been solved in #472.
Please:
The current brainpy transformations can only trace
Variable
outside these transformation functions. For example,This is in contrast to the OO transformations in Flax, which supports to trace
Variable
s inside of a transformation function.It may be essential to support
Variable
tracing during a computation.