Skip to content

Commit 385ddb8

Browse files
committed
Load tensorflow differently
1 parent a85ef22 commit 385ddb8

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/Tensorflow/TensorFlow.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,7 @@ public function __construct()
6363

6464
private function initializeFFI()
6565
{
66-
$cwd = getcwd();
67-
chdir(realpath(__DIR__ . '/../..'));
68-
69-
TensorFlow::$ffi = FFI::load(__DIR__ . "/../../c/tf_singlefile.2.3.0.h");
70-
71-
chdir($cwd);
66+
TensorFlow::$ffi = FFI::cdef(file_get_contents(__DIR__ . "/../../c/tf_singlefile.2.3.0.h"), __DIR__ . "/../../lib/libtensorflow.so.2.3.0");
7267
}
7368

7469
public function version()

0 commit comments

Comments
 (0)