aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/g3doc/api_docs/cc/index.md
blob: 82aafc7486db78e19b7786fe2632c19b5aed3e2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# TensorFlow C++ Session API reference documentation

TensorFlow's public C++ API includes only the API for executing graphs, as of
version 0.5. To control the execution of a graph from C++:

1. Build the computation graph using the [Python API](../python/).
1. Use [tf.train.write_graph()](../python/train.md?cl=head#write_graph) to
write the graph to a file.
1. Load the graph using the C++ Session API. For example:

  ```c++
  // Reads a model graph definition from disk, and creates a session object you
  // can use to run it.
  Status LoadGraph(string graph_file_name, Session** session) {
    GraphDef graph_def;
    TF_RETURN_IF_ERROR(
        ReadBinaryProto(Env::Default(), graph_file_name, &graph_def));
    TF_RETURN_IF_ERROR(NewSession(SessionOptions(), session));
    TF_RETURN_IF_ERROR((*session)->Create(graph_def));
    return Status::OK();
  }
```

1. Run the graph with a call to `session->Run()`


##Classes

* [tensorflow::Env](ClassEnv.md)
* [tensorflow::EnvWrapper](ClassEnvWrapper.md)
* [tensorflow::RandomAccessFile](ClassRandomAccessFile.md)
* [tensorflow::Session](ClassSession.md)
* [tensorflow::Status](ClassStatus.md)
* [tensorflow::Tensor](ClassTensor.md)
* [tensorflow::TensorBuffer](ClassTensorBuffer.md)
* [tensorflow::TensorShape](ClassTensorShape.md)
* [tensorflow::TensorShapeIter](ClassTensorShapeIter.md)
* [tensorflow::TensorShapeUtils](ClassTensorShapeUtils.md)
* [tensorflow::Thread](ClassThread.md)
* [tensorflow::WritableFile](ClassWritableFile.md)

##Structs

* [tensorflow::SessionOptions](StructSessionOptions.md)
* [tensorflow::Status::State](StructState.md)
* [tensorflow::TensorShapeDim](StructTensorShapeDim.md)
* [tensorflow::ThreadOptions](StructThreadOptions.md)


<div class='sections-order' style="display: none;">
<!--
<!-- ClassEnv.md -->
<!-- ClassEnvWrapper.md -->
<!-- ClassRandomAccessFile.md -->
<!-- ClassSession.md -->
<!-- ClassStatus.md -->
<!-- ClassTensor.md -->
<!-- ClassTensorBuffer.md -->
<!-- ClassTensorShape.md -->
<!-- ClassTensorShapeIter.md -->
<!-- ClassTensorShapeUtils.md -->
<!-- ClassThread.md -->
<!-- ClassWritableFile.md -->
<!-- StructSessionOptions.md -->
<!-- StructState.md -->
<!-- StructTensorShapeDim.md -->
<!-- StructThreadOptions.md -->
-->
</div>