to_ivy_module

ivy.neural_net_stateful.converters.to_ivy_module(native_module=None, native_module_class=None, args=None, kwargs=None, dev_str=None, dev_strs=None, inplace_update=False, f=None)[source]

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

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

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

  • args (list of any) – Positional arguments to pass to the native module class. Default is None.

  • kwargs (dict of any) – Key-word arguments to pass to the native module class. Default is None.

  • dev_str (str, optional) – The device on which to create module variables. Default is None.

  • dev_strs (sequence of str, optional) – The devices on which to create module variables. Default is None.

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

  • f (ml_framework, optional) – Machine learning library. Inferred from Inputs if None.

Returns

The new trainable ivy.Module instance.


Supported Frameworks:

empty jax_logo empty tf_logo empty pytorch_logo empty mxnet_logo empty numpy_logo empty