equinox icon indicating copy to clipboard operation
equinox copied to clipboard

Best practices to convert `torch.nn.Module` to `eqx.Module`

Open emilemathieu opened this issue 1 year ago • 12 comments

Thanks for the great package!

I was wondering whether there was some documentation regarding the best practice for converting torch.nn.Module to eqx.Module?

In particular

  • It is quite clear that the register_parameters would be replace by an attribute .e.g. weights: Array
  • How one should handle register_buffer?
  • and add_module(name, intertwiner_basis)? especially when the name is not known in advanced e.g. f"module_{variable}"

Thanks a lot!

(for context I'm looking at porting escnn to jax cf https://github.com/QUVA-Lab/escnn/issues/55)

emilemathieu avatar Jun 15 '23 14:06 emilemathieu