How to test the Python and TensorFlow examples ?

How to test the Python and TensorFlow examples ?

Postby Antonio Linares » Tue Aug 15, 2017 12:51 am

1. Download and install Python from here:

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

2. Install TensorFlow for Python:

From a cmd window execute this:
pip3 install --upgrade tensorflow

3. Create this file:
tf.py
Code: Select all  Expand view
import tensorflow as tf
hello = tf.constant( "Hello world" )
session = tf.Session()
print( session.run( hello ) )


4. from a cmd window execute:
python tf.py

You will get:
b'Hello world'
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42097
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: How to test the Python and TensorFlow examples ?

Postby Biel EA6DD » Fri Aug 18, 2017 9:33 am

Microsoft Visual C++ 2015 Redistributable X64 is required, probably you already have it installed. If not, you can download from here
https://www.microsoft.com/en-us/download/details.aspx?id=53587
Saludos desde Mallorca
Biel Maimó
http://bielsys.blogspot.com/
User avatar
Biel EA6DD
 
Posts: 682
Joined: Tue Feb 14, 2006 9:48 am
Location: Mallorca


Return to Artificial Intelligence examples

Who is online

Users browsing this forum: No registered users and 1 guest