From 0ef3d7a93753e6e6beb8f40cac3954491b456456 Mon Sep 17 00:00:00 2001
From: Stephan Seitz <stephan.seitz@fau.de>
Date: Thu, 28 Nov 2019 18:35:57 +0100
Subject: [PATCH] Fix loading of tensorflow modules

---
 src/pystencils_autodiff/backends/astnodes.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/pystencils_autodiff/backends/astnodes.py b/src/pystencils_autodiff/backends/astnodes.py
index 3355271..4c6c41d 100644
--- a/src/pystencils_autodiff/backends/astnodes.py
+++ b/src/pystencils_autodiff/backends/astnodes.py
@@ -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)
 
-- 
GitLab