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
Darkmatter
Darkmatter3mo ago
There is not. Static reflection might allow that in the future.
Gennadiy
GennadiyOP3mo ago
OK, thanks.

Did you find this page helpful?