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
87a4ad70
Commit
87a4ad70
authored
5 years ago
by
Stephan Seitz
Browse files
Options
Downloads
Patches
Plain Diff
Set global_config for doctests
parent
f8f048ed
Branches
textures
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/conf.py
+15
-10
15 additions, 10 deletions
docs/conf.py
tests/test_tfmad.py
+4
-6
4 additions, 6 deletions
tests/test_tfmad.py
with
19 additions
and
16 deletions
docs/conf.py
+
15
−
10
View file @
87a4ad70
...
@@ -8,11 +8,16 @@
...
@@ -8,11 +8,16 @@
# All configuration values have a default; values that are commented out
# All configuration values have a default; values that are commented out
# serve to show the default.
# serve to show the default.
import
os
import
sys
import
inspect
import
inspect
import
os
import
shutil
import
shutil
import
sys
doctest_global_setup
=
'''
import pystencils
import numpy as np
import sympy
'''
__location__
=
os
.
path
.
join
(
os
.
getcwd
(),
os
.
path
.
dirname
(
__location__
=
os
.
path
.
join
(
os
.
getcwd
(),
os
.
path
.
dirname
(
inspect
.
getfile
(
inspect
.
currentframe
())))
inspect
.
getfile
(
inspect
.
currentframe
())))
...
@@ -222,21 +227,21 @@ htmlhelp_basename = 'pystencils_autodiff-doc'
...
@@ -222,21 +227,21 @@ htmlhelp_basename = 'pystencils_autodiff-doc'
# -- Options for LaTeX output --------------------------------------------------
# -- Options for LaTeX output --------------------------------------------------
latex_elements
=
{
latex_elements
=
{
# The paper size ('letterpaper' or 'a4paper').
# The paper size ('letterpaper' or 'a4paper').
# 'papersize': 'letterpaper',
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
# The font size ('10pt', '11pt' or '12pt').
# 'pointsize': '10pt',
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
# Additional stuff for the LaTeX preamble.
# 'preamble': '',
# 'preamble': '',
}
}
# Grouping the document tree into LaTeX files. List of tuples
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents
=
[
latex_documents
=
[
(
'
index
'
,
'
user_guide.tex
'
,
u
'
pystencils_autodiff Documentation
'
,
(
'
index
'
,
'
user_guide.tex
'
,
u
'
pystencils_autodiff Documentation
'
,
u
'
Stephan Seitz
'
,
'
manual
'
),
u
'
Stephan Seitz
'
,
'
manual
'
),
]
]
# The name of an image file (relative to this directory) to place at the top of
# The name of an image file (relative to this directory) to place at the top of
...
...
This diff is collapsed.
Click to expand it.
tests/test_tfmad.py
+
4
−
6
View file @
87a4ad70
...
@@ -179,12 +179,10 @@ def test_tfmad_gradient_check_torch():
...
@@ -179,12 +179,10 @@ def test_tfmad_gradient_check_torch():
print
(
'
Forward output fields (to check order)
'
)
print
(
'
Forward output fields (to check order)
'
)
print
(
auto_diff
.
forward_input_fields
)
print
(
auto_diff
.
forward_input_fields
)
a_tensor
=
torch
.
zeros
(
a_tensor
=
torch
.
zeros
(
*
a
.
shape
,
dtype
=
torch
.
float64
,
requires_grad
=
True
)
*
a
.
shape
,
dtype
=
torch
.
float64
,
requires_grad
=
True
)
b_tensor
=
torch
.
zeros
(
*
b
.
shape
,
dtype
=
torch
.
float64
,
requires_grad
=
True
)
b_tensor
=
torch
.
zeros
(
*
b
.
shape
,
dtype
=
torch
.
float64
,
requires_grad
=
True
)
function
=
auto_diff
.
create_tensorflow_op
({
a
:
a_tensor
,
b
:
b_tensor
},
backend
=
'
torch
'
)
function
=
auto_diff
.
create_tensorflow_op
(
{
a
:
a_tensor
,
b
:
b_tensor
},
backend
=
'
torch
'
)
torch
.
autograd
.
gradcheck
(
function
.
apply
,
[
a_tensor
,
b_tensor
])
torch
.
autograd
.
gradcheck
(
function
.
apply
,
[
a_tensor
,
b_tensor
])
...
...
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