Skip to content

Commit

Permalink
Update snippet language for Python code
Browse files Browse the repository at this point in the history
  • Loading branch information
Toni-SM committed Jan 7, 2025
1 parent b7c2ab8 commit afc119c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions docs/source/api/utils/model_instantiators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -292,21 +292,21 @@ Apply a linear transformation (:py:class:`torch.nn.Linear` in PyTorch, :py:class
.. group-tab:: Single value

.. literalinclude:: ../../snippets/model_instantiators.txt
:language: yaml
:language: python
:start-after: [start-layer-linear-basic-python]
:end-before: [end-layer-linear-basic-python]

.. group-tab:: As int

.. literalinclude:: ../../snippets/model_instantiators.txt
:language: yaml
:language: python
:start-after: [start-layer-linear-int-python]
:end-before: [end-layer-linear-int-python]

.. group-tab:: As list

.. literalinclude:: ../../snippets/model_instantiators.txt
:language: yaml
:language: python
:start-after: [start-layer-linear-list-python]
:end-before: [end-layer-linear-list-python]

Expand All @@ -317,7 +317,7 @@ Apply a linear transformation (:py:class:`torch.nn.Linear` in PyTorch, :py:class
The parameter names can be interchanged/mixed between PyTorch and JAX

.. literalinclude:: ../../snippets/model_instantiators.txt
:language: yaml
:language: python
:start-after: [start-layer-linear-dict-python]
:end-before: [end-layer-linear-dict-python]

Expand Down Expand Up @@ -415,7 +415,7 @@ Apply a 2D convolution (:py:class:`torch.nn.Conv2d` in PyTorch, :py:class:`flax.
.. group-tab:: As list

.. literalinclude:: ../../snippets/model_instantiators.txt
:language: yaml
:language: python
:start-after: [start-layer-conv2d-list-python]
:end-before: [end-layer-conv2d-list-python]

Expand All @@ -426,7 +426,7 @@ Apply a 2D convolution (:py:class:`torch.nn.Conv2d` in PyTorch, :py:class:`flax.
The parameter names can be interchanged/mixed between PyTorch and JAX

.. literalinclude:: ../../snippets/model_instantiators.txt
:language: yaml
:language: python
:start-after: [start-layer-conv2d-dict-python]
:end-before: [end-layer-conv2d-dict-python]

Expand Down Expand Up @@ -497,14 +497,14 @@ Flatten a contiguous range of dimensions (:py:class:`torch.nn.Flatten` in PyTorc
.. group-tab:: Single value

.. literalinclude:: ../../snippets/model_instantiators.txt
:language: yaml
:language: python
:start-after: [start-layer-flatten-basic-python]
:end-before: [end-layer-flatten-basic-python]

.. group-tab:: As list

.. literalinclude:: ../../snippets/model_instantiators.txt
:language: yaml
:language: python
:start-after: [start-layer-flatten-list-python]
:end-before: [end-layer-flatten-list-python]

Expand All @@ -515,7 +515,7 @@ Flatten a contiguous range of dimensions (:py:class:`torch.nn.Flatten` in PyTorc
The parameter names can be interchanged/mixed between PyTorch and JAX

.. literalinclude:: ../../snippets/model_instantiators.txt
:language: yaml
:language: python
:start-after: [start-layer-flatten-dict-python]
:end-before: [end-layer-flatten-dict-python]

Expand Down

0 comments on commit afc119c

Please sign in to comment.