Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pycodegen
pystencils_autodiff
Commits
0ef3d7a9
Commit
0ef3d7a9
authored
Nov 28, 2019
by
Stephan Seitz
Browse files
Fix loading of tensorflow modules
parent
d2c11529
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/pystencils_autodiff/backends/astnodes.py
View file @
0ef3d7a9
...
...
@@ -148,9 +148,9 @@ class TensorflowModule(TorchModule):
def
compile
(
self
):
from
pystencils_autodiff.tensorflow_jit
import
compile_sources_and_load
if
self
.
is_cuda
:
self
.
compiled_file
=
compile_sources_and_load
([],
cuda_sources
=
[
str
(
self
)])
self
.
compiled_file
=
compile_sources_and_load
([],
cuda_sources
=
[
str
(
self
)]
,
compile_only
=
True
)
else
:
self
.
compiled_file
=
compile_sources_and_load
([
str
(
self
)])
self
.
compiled_file
=
compile_sources_and_load
([
str
(
self
)]
,
compile_only
=
True
)
import
tensorflow
as
tf
return
tf
.
load_op_library
(
self
.
compiled_file
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment