Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pystencils_autodiff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
pycodegen
pystencils_autodiff
Commits
75f1a1c0
Commit
75f1a1c0
authored
5 years ago
by
Stephan Seitz
Browse files
Options
Downloads
Patches
Plain Diff
Fix README.rst/index.rst
parent
1666f0b9
No related branches found
No related tags found
No related merge requests found
Pipeline
#20548
failed
5 years ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.rst
+2
-7
2 additions, 7 deletions
README.rst
docs/index.rst
+9
-7
9 additions, 7 deletions
docs/index.rst
with
11 additions
and
14 deletions
README.rst
+
2
−
7
View file @
75f1a1c0
...
@@ -92,18 +92,13 @@ You can also use the class `AutoDiffOp` to obtain both the assignments (if you a
...
@@ -92,18 +92,13 @@ You can also use the class `AutoDiffOp` to obtain both the assignments (if you a
op = AutoDiffOp(forward_assignments)
op = AutoDiffOp(forward_assignments)
backward_assignments = op.backward_assignments
backward_assignments = op.backward_assignments
x_tensor = pystencils.autodiff.tf_variable_from_field(x)
tensorflow_op = op.create_tensorflow_op(backend='tensorflow_native')
y_tensor = pystencils.autodiff.tf_variable_from_field(y)
tensorflow_op = op.create_tensorflow_op({x: x_tensor, y: y_tensor}, backend='tensorflow')
... or Torch:
... or Torch:
.. code-block:: python
.. code-block:: python
x_tensor = pystencils.autodiff.torch_tensor_from_field(x, cuda=False, requires_grad=True)
torch_op = op.create_tensorflow_op({x: x_tensor, y: y_tensor}, backend='torch_native')
y_tensor = pystencils.autodiff.torch_tensor_from_field(y, cuda=False, requires_grad=True)
z_tensor = op.create_tensorflow_op({x: x_tensor, y: y_tensor}, backend='torch')
Test Report and Coverage
Test Report and Coverage
------------------------
------------------------
...
...
This diff is collapsed.
Click to expand it.
docs/index.rst
+
9
−
7
View file @
75f1a1c0
...
@@ -84,18 +84,20 @@ You can also use the class :class:`pystencils_autodiff.AutoDiffOp` to obtain bot
...
@@ -84,18 +84,20 @@ You can also use the class :class:`pystencils_autodiff.AutoDiffOp` to obtain bot
op = AutoDiffOp(forward_assignments)
op = AutoDiffOp(forward_assignments)
backward_assignments = op.backward_assignments
backward_assignments = op.backward_assignments
x_tensor = pystencils.autodiff.tf_variable_from_field(x)
tensorflow_op = op.create_tensorflow_op(backend='tensorflow_native')
y_tensor = pystencils.autodiff.tf_variable_from_field(y)
tensorflow_op = op.create_tensorflow_op({x: x_tensor, y: y_tensor}, backend='tensorflow')
.. testoutput::
:hide:
:options: -ELLIPSIS, +NORMALIZE_WHITESPACE
Compiling Tensorflow module...
Linking Tensorflow module...
... or Torch:
... or Torch:
.. testcode::
.. testcode::
x_tensor = pystencils.autodiff.torch_tensor_from_field(x, cuda=False, requires_grad=True)
torch_op = op.create_tensorflow_op(backend='torch_native')
y_tensor = pystencils.autodiff.torch_tensor_from_field(y, cuda=False, requires_grad=True)
z_tensor = op.create_tensorflow_op({x: x_tensor, y: y_tensor}, backend='torch')
Contents
Contents
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment