Skip to content

Commit 4d97aff

Browse files
committed
add tensorflow hello demo
1 parent 12a2629 commit 4d97aff

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

apps/tensorflow-hello.ss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2+
;author:evilbinary on 31/03/18.
3+
4+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
5+
(import (scheme) (tensorflow tensorflow-ffi) )
6+
7+
(printf "Hello from TensorFlow scheme library version ~a\n" (tf-version))

packages/tensorflow/tensorflow-ffi.ss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
55
(library (tensorflow tensorflow-ffi )
66
(export tf-data-type-size
7+
tf-version
78
tf-delete-status
89
tf-set-status
910
tf-get-code
@@ -142,6 +143,10 @@
142143
((a6le i3le ta6le ti3le) "libtensorflow.so")))
143144
(define lib (load-librarys lib-name ))
144145

146+
;;const char* TF_Version();
147+
(def-function tf-version
148+
"TF_Version" (void) string)
149+
145150
;;size_t TF_DataTypeSize(TF_DataType dt)
146151
(def-function tf-data-type-size
147152
"TF_DataTypeSize" (TF_DataType) int)

0 commit comments

Comments
 (0)