
    3j'                     R    S r SSKJr  SSKrSSKJr  S\4S jrS\4S jrS\4S jrg)	z2Module for transpiling Kornia to other frameworks.    )
ModuleTypeN)ivyreturnc                  6    [         R                  " [        SSS9$ )a  Convert Kornia to JAX.

Transpiles the Kornia library to JAX using [ivy](https://github.com/ivy-llc/ivy). The transpilation process
occurs lazily, so the transpilation on a given kornia function/class will only occur when it's called or
instantiated for the first time. This will make any functions/classes slow when being used for the first time,
but any subsequent uses should be as fast as expected.

Return:
    The Kornia library transpiled to JAX

Example:

.. highlight:: python
.. code-block:: python

    import kornia
    jax_kornia = kornia.to_jax()
    import jax
    input = jax.random.normal(jax.random.key(42), shape=(2, 3, 4, 5))
    gray = jax_kornia.color.gray.rgb_to_grayscale(input)

torchjaxsourcetargetr   	transpilekornia     V/home/wildlama/miniconda3/lib/python3.13/site-packages/kornia/transpiler/transpiler.pyto_jaxr      s    . == r   c                  6    [         R                  " [        SSS9$ )a
  Convert Kornia to NumPy.

Transpiles the Kornia library to NumPy using [ivy](https://github.com/ivy-llc/ivy). The transpilation process
occurs lazily, so the transpilation on a given kornia function/class will only occur when it's called or
instantiated for the first time. This will make any functions/classes slow when being used for the first time,
but any subsequent uses should be as fast as expected.

Return:
    The Kornia library transpiled to NumPy

Example:

.. highlight:: python
.. code-block:: python

    import kornia
    np_kornia = kornia.to_numpy()
    import numpy as np
    input = np.random.normal(size=(2, 3, 4, 5))
    gray = np_kornia.color.gray.rgb_to_grayscale(input)

Note:
    Ivy does not currently support transpiling trainable modules to NumPy.

r   numpyr	   r   r   r   r   to_numpyr   8   s    4 == r   c                  6    [         R                  " [        SSS9$ )a  Convert Kornia to TensorFlow.

Transpiles the Kornia library to TensorFlow using [ivy](https://github.com/ivy-llc/ivy). The transpilation process
occurs lazily, so the transpilation on a given kornia function/class will only occur when it's called or
instantiated for the first time. This will make any functions/classes slow when being used for the first time,
but any subsequent uses should be as fast as expected.

Return:
    The Kornia library transpiled to TensorFlow

Example:

.. highlight:: python
.. code-block:: python

    import kornia
    tf_kornia = kornia.to_tensorflow()
    import tensorflow as tf
    input = tf.random.normal((2, 3, 4, 5))
    gray = tf_kornia.color.gray.rgb_to_grayscale(input)

r   
tensorflowr	   r   r   r   r   to_tensorflowr   Y   s    . == r   )	__doc__typesr   r   kornia.core.externalr   r   r   r   r   r   r   <module>r      s8   $ 9   $
 <* Bz r   