TensorFlow distributed clustered Local Server

Source: Internet
Author: User

A simple distributed service (local server) feature is provided in TensorFlow, and a simple distributed program can be run with the local server service. The local Server implements the same interface as the distributed service, so it is more convenient for development testing.

Here's the simplest example.

Import TensorFlow as tf
server = Tf.train.Server.create_local_server () with
TF. Session (Server.target) as session:
    matrix1 = Tf.constant ([[3., 3.]])
    matrix2 = Tf.constant ([[[2.],[2.]])
    Product = Tf.matmul (matrix1, matrix2) Result
    = Session.run (product)
    print result

where the Tf.train.Server.create_local_server () method creates a single process cluster.

In addition, running this program is actually the server and client started in the same process.

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.