ubuntu16.01 Anaconda under the TensorFlow installation

Source: Internet
Author: User
Tags jupyter

First, download anaconda, install.

sudo bash ana...........sh

Second, configure environment variables

Add the last sentence:/home/py/ana/bin is the installation address

Installation completed reboot.

Enter Python. I saw Anaconda.

Third, Conda Environment

Create an PY3.5 version of the environment named TensorFlow

Here the official website says with the default source. It is quicker to use the one I recommended below.

Conda install-n tensortflow-c Https://conda.anaconda.org/jjhelmus TensorFlow

IPython, advanced Python runtime environment

is now renamed Jupyter (http://jupyter.org/), which supports the sharing of algorithmic models through notebook.

Spark, high performance parallel computing environment

From Https://conda.anaconda.org/anaconda-cluster you can access to the integrated spark version.

Installation:

conda install-n tensor -c https://conda.anaconda.org/anaconda-cluster spark

TensorFlow, machine learning engine

TensorFlow is an open-source, neural-based machine learning engine from Google that accesses details from https://www.tensorflow.org/.

Installation:

conda install-n tensor -c https://conda.anaconda.org/jjhelmus tensorflow

Iv. TestingTest procedures on the official website. Demo for training a linear data
ImportTensorFlow as TFImportNumPy as NP#Create phony x, y data points in NumPy, y = x * 0.1 + 0.3X_data = Np.random.rand (100). Astype (np.float32) Y_data= X_data * 0.1 + 0.3#Try to find values for W and b that compute y_data = W * X_data + b#(We know that W should is 0.1 and B 0.3, but TensorFlow would#Figure which is out for us.)W = tf. Variable (Tf.random_uniform ([1],-1.0, 1.0)) b= TF. Variable (Tf.zeros ([1])) y= W * X_data +b#Minimize the mean squared errors.Loss = Tf.reduce_mean (Tf.square (Y-y_data)) Optimizer= Tf.train.GradientDescentOptimizer (0.5) Train=optimizer.minimize (loss)#before starting, initialize the variables. We'll ' run ' this first.init =tf.initialize_all_variables ()#Launch the graph.Sess =TF. Session () sess.run (init)#Fit the line. forStepinchRange (201): Sess.run (train)ifStep% 20 = =0:Print(step, Sess.run (W), Sess.run (b))#learns best fit is W: [0.1], B: [0.3]

This is the py3 that can run straight.

It is recommended that you use sublime to write code on Ubuntu.

Results

ubuntu16.01 Anaconda under the TensorFlow installation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.