Converters

Converters from Native Modules to Ivy Modules

ivy.stateful.converters.to_ivy_module(native_module=None, native_module_class=None, args=None, kwargs=None, device=None, devices=None, inplace_update=False)[source]

Convert an instance of a trainable module from a native framework into a trainable ivy.Module instance.

Parameters
  • native_module – The module in the native framework to convert, required if native_module_class is not given. Default is None.

  • native_module_class – The class of the native module, required if native_module is not given. Default is None.

  • args – Positional arguments to pass to the native module class. Default is None.

  • kwargs – Key-word arguments to pass to the native module class. Default is None.

  • device – The device on which to create module variables. Default is None.

  • devices – The devices on which to create module variables. Default is None.

  • inplace_update – For backends with dedicated variable classes, whether to update these inplace. Default is False.

Returns

ret – The new trainable ivy.Module instance.

This should have hopefully given you an overview of the converters submodule,If you have any questions, please feel free to reach out on our discord in the converters channel or in the converters forum!