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
Show more breadcrumbs
Stephan Seitz
pystencils_autodiff
Commits
de9d6e22
Commit
de9d6e22
authored
5 years ago
by
Stephan Seitz
Browse files
Options
Downloads
Patches
Plain Diff
tf.pyfunc -> tensorflow.compat.v1.py_func
parent
2f91a2a3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/pystencils_autodiff/backends/_tensorflow.py
+2
-2
2 additions, 2 deletions
src/pystencils_autodiff/backends/_tensorflow.py
with
2 additions
and
2 deletions
src/pystencils_autodiff/backends/_tensorflow.py
+
2
−
2
View file @
de9d6e22
import
tensorflow
as
tf
from
tensorflow.compat.v1
import
get_default_graph
,
py_func
import
pystencils_autodiff
from
tensorflow.compat.v1
import
get_default_graph
_num_generated_ops
=
0
...
...
@@ -33,7 +33,7 @@ def _py_func(func, inp, Tout, stateful=False, name=None, grad=None):
# Add gradient override map
with
g
.
gradient_override_map
({
"
PyFunc
"
:
rnd_name
,
"
PyFuncStateless
"
:
rnd_name
}):
return
tf
.
py_func
(
func
,
inp
,
Tout
,
stateful
=
stateful
,
name
=
name
)
return
py_func
(
func
,
inp
,
Tout
,
stateful
=
stateful
,
name
=
name
)
def
tensorflowop_from_autodiffop
(
autodiffop
:
pystencils_autodiff
.
AutoDiffOp
,
...
...
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