index.rst.txt 490 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Customized Operations For Different Fields
============================================

Here is another example of the custom operations implemented \
with both native torch API and treetensor API.

.. literalinclude:: operation.demo.py
    :language: python
    :linenos:

The output should be like below, and all the assertions can \
be passed.

.. literalinclude:: operation.demo.py.txt
    :language: text
    :linenos:

The implement with treetensor API is much simpler and clearer.