2017-08-01 4 views
0

Ich frage mich, ob der Import von Tensorflow in einer Jython-Sitzung machbar ist und wenn ja, wie soll ich meine Umgebung konfigurieren, damit sie läuft.Tensorflow in einer Jython-Sitzung importieren?

Natürlich funktioniert der Import von Tensorflow mit Python wie erwartet. Ist Tensorflow kompatibel mit Jython?

[matacheck] /home/ghodbane/mlp > python 
imPython 2.7.12 |Continuum Analytics, Inc.| (default, Jul 2 2016, 17:42:40) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2 
Type "help", "copyright", "credits" or "license" for more information. 
Anaconda is brought to you by Continuum Analytics. 
Please check out: http://continuum.io/thanks and https://anaconda.org 
>>> import tensorflow as tf 
>>> 

während bei Jython

[matacheck] /home/ghodbane/mlp > jython 
Jython 2.7.0 (default:9987c746f838, Apr 29 2015, 02:25:11) 
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.8.0_101 
Type "help", "copyright", "credits" or "license" for more information. 
>>> import tensorflow as tf 
Traceback (most recent call last): 
File "<stdin>", line 1, in <module> 
ImportError: No module named tensorflow 
>>> 

Update: Ich versuchte, die libtensorflow JAR zu laden, aber immer noch, scheine ich hier etwas zu fehlen ...

>>> import sys 
>>> sys.path.append("libtensorflow-1.2.1.jar") 
>>> help(tf) # OK 

aber ich muss fehlen einige offensichtlich Schritt, um die Hallo Tensorflow Fall Arbeit zu bekommen ...

Antwort

Verwandte Themen