Commit a7d2bf41 authored by Stephan Seitz's avatar Stephan Seitz
Browse files

Add AutoDiffOp.create_torch_op

parent 4d8ddc23
===================
pystencils_autodiff
pystencils-autodiff
===================
This is the documentation of **pystencils_autodiff**.
This is the documentation of **pystencils-autodiff**.
.. include:: ../README.rst
Contents
......
......@@ -21,6 +21,11 @@ class DiffModes(str, Enum):
class AutoDiffOp:
"""
Class to generate code for forward and backward kernels for automatic
differentiation operators.
"""
_REPR_TEMPLATE = jinja2.Template(
"""Forward:
{{ forward_assignments | indent(4) }}
......@@ -432,6 +437,9 @@ Backward:
def time_constant_fields(self):
return self._time_constant_fields
def create_torch_op(self, *args, **kwags):
return self.create_tensorflow_op(*args, backend='torch_native', **kwags)
def create_tensorflow_op(self,
inputfield_tensor_dict,
forward_loop=None,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment