Mojo equivalent of Python class parameters
In Python, you can create a class, say "model" and ask for its parameters using
model.parameters
.
Is there an equivalent for a struct in Mojo?
I would like to pass it to something like: torch.optim.Adam(model.parameters(), ...)
.2 Replies
There is not. Static reflection might allow that in the future.
OK, thanks.