FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index Off Topic / Otros temas Testing TensorFlow with Python on Windows
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Testing TensorFlow with Python on Windows

Posted: Wed Aug 02, 2017 07:41 AM
Download and install Python: (check on Add Python on the path)

https://www.python.org/ftp/python/3.6.2/python-3.6.2-amd64.exe

Run this from a terminal Window (cmd):

pip3 install --upgrade tensorflow

To test it:

c:\>python
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> hello = tf.constant( "Hello world" )
>>> session = tf.Session()
>>> print( session.run( hello ) )
b'Hello world'
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Testing TensorFlow with Python on Windows

Posted: Wed Aug 02, 2017 09:32 AM
Running a python file:

hello.py
Code (fw): Select all Collapse
print( "Hello world" )


Open a Windows console window (cmd) and type:
python hello.py

c:\>python hello.py
Hello world
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Testing TensorFlow with Python on Windows

Posted: Wed Aug 02, 2017 09:35 AM
Running tensorflow from a python file:

tf.py
Code (fw): Select all Collapse
import tensorflow as tf
hello = tf.constant( "Hello world" )
session = tf.Session()
print( session.run( hello ) )


from a cmd window execute:
python tf.py
b'Hello world'
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion