You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given a pattern, stores in *results the set of paths that matches that pattern. *results is cleared.
102
+
103
+
pattern must match all of a name, not just a substring. pattern: { term } term: '*': matches any sequence of non-'/' characters '?': matches a single non-'/' character '['['^'] { match-list } ']': matches any single character (not) on the list c: matches character c (c != '*', '?', '\', '[') '\' c: matches character c character-range: c: matches character c (c != '\', '-', ']') '\' c: matches character c lo '-' hi: matches character c for lo <= c <= hi
104
+
105
+
Typical return codes
106
+
107
+
OK - no errors
108
+
109
+
UNIMPLEMENTED - Some underlying functions (like GetChildren) are not implemented The default implementation uses a combination of GetChildren, MatchPath and IsDirectory.
Copy file name to clipboardExpand all lines: tensorflow/g3doc/api_docs/cc/ClassSession.md
+1-30Lines changed: 1 addition & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,36 +6,7 @@ When a Session is created with a given target, a new Session object is bound to
6
6
7
7
Example:
8
8
9
-
```c++ tensorflow::GraphDef graph;
10
-
// ... Create or load graph into "graph".
11
-
12
-
// This example uses the default options which connects
13
-
// to a local runtime.
14
-
tensorflow::SessionOptions options;
15
-
std::unique_ptr<tensorflow::Session>
16
-
session(tensorflow::NewSession(options));
17
-
18
-
// Create the session with this graph.
19
-
tensorflow::Status s = session->Create(graph);
20
-
if (!s.ok()) { ... }
21
-
22
-
// Run the graph and fetch the first output of the "output"
23
-
// operation, and also run to but do not return anything
24
-
// for the "update_state" operation.
25
-
std::vector<tensorflow::Tensor> outputs;
26
-
s = session->Run({}, {"output:0"}, {"update_state"}, &outputs);
27
-
if (!s.ok()) { ... }
28
-
29
-
// Map the output as a flattened float tensor, and do something
30
-
// with it.
31
-
auto output_tensor = outputs[0].flat<float>();
32
-
if (output_tensor(0) > 0.5) { ... }
33
-
34
-
// Close the session to release the resources associated with
35
-
// this session.
36
-
session->Close();
37
-
38
-
```
9
+
{c++} tensorflow::GraphDef graph; // ... Create or load graph into "graph". // This example uses the default options which connects // to a local runtime. tensorflow::SessionOptions options; std::unique_ptr<tensorflow::Session> session(tensorflow::NewSession(options)); // Create the session with this graph. tensorflow::Status s = session->Create(graph); if (!s.ok()) { ... } // Run the graph and fetch the first output of the "output" // operation, and also run to but do not return anything // for the "update_state" operation. std::vector<tensorflow::Tensor> outputs; s = session->Run({}, {"output:0"}, {"update_state"}, &outputs); if (!s.ok()) { ... } // Map the output as a flattened float tensor, and do something // with it. auto output_tensor = outputs[0].flat<float>(); if (output_tensor(0) > 0.5) { ... } // Close the session to release the resources associated with // this session. session->Close();
39
10
40
11
A Session allows concurrent calls to Run() , though a Session must be created / extended by a single thread.
Copy file name to clipboardExpand all lines: tensorflow/g3doc/api_docs/cc/ClassTensor.md
+4-35Lines changed: 4 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,9 +12,7 @@ Creates a 1-dimensional, 0-element float tensor.
12
12
13
13
The returned Tensor is not a scalar (shape {}), but is instead an empty one-dimensional Tensor (shape {0}, NumElements() == 0). Since it has no elements, it does not need to be assigned a value and is initialized by default ( IsInitialized() is true). If this is undesirable, consider creating a one-element scalar which does require initialization:
@@ -184,15 +176,7 @@ Use these methods when you know the data type and the number of dimensions of th
184
176
185
177
Example:
186
178
187
-
```c++ typedef float T;
188
-
Tensor my_mat(...built with Shape{rows: 3, cols: 5}...);
189
-
auto mat = my_mat.matrix<T>(); // 2D Eigen::Tensor, 3 x 5.
190
-
auto mat = my_mat.tensor<T, 2>(); // 2D Eigen::Tensor, 3 x 5.
191
-
auto vec = my_mat.vec<T>(); // CHECK fails as my_mat is 2D.
192
-
auto vec = my_mat.tensor<T, 3>(); // CHECK fails as my_mat is 2D.
193
-
auto mat = my_mat.matrix<int32>();// CHECK fails as type mismatch.
194
-
195
-
```
179
+
{c++} typedef float T; Tensor my_mat(...built with Shape{rows: 3, cols: 5}...); auto mat = my_mat.matrix<T>(); // 2D Eigen::Tensor, 3 x 5. auto mat = my_mat.tensor<T, 2>(); // 2D Eigen::Tensor, 3 x 5. auto vec = my_mat.vec<T>(); // CHECK fails as my_mat is 2D. auto vec = my_mat.tensor<T, 3>(); // CHECK fails as my_mat is 2D. auto mat = my_mat.matrix<int32>();// CHECK fails as type mismatch.
@@ -220,22 +204,7 @@ These methods allow you to access the data with the dimensions and sizes of your
220
204
221
205
Example:
222
206
223
-
```c++ typedef float T;
224
-
Tensor my_ten(...built with Shape{planes: 4, rows: 3, cols: 5}...);
225
-
// 1D Eigen::Tensor, size 60:
226
-
auto flat = my_ten.flat<T>();
227
-
// 2D Eigen::Tensor 12 x 5:
228
-
auto inner = my_ten.flat_inner_dims<T>();
229
-
// 2D Eigen::Tensor 4 x 15:
230
-
auto outer = my_ten.shaped<T, 2>({4, 15});
231
-
// CHECK fails, bad num elements:
232
-
auto outer = my_ten.shaped<T, 2>({4, 8});
233
-
// 3D Eigen::Tensor 6 x 5 x 2:
234
-
auto weird = my_ten.shaped<T, 3>({6, 5, 2});
235
-
// CHECK fails, type mismatch:
236
-
auto bad = my_ten.flat<int32>();
237
-
238
-
```
207
+
{c++} typedef float T; Tensor my_ten(...built with Shape{planes: 4, rows: 3, cols: 5}...); // 1D Eigen::Tensor, size 60: auto flat = my_ten.flat<T>(); // 2D Eigen::Tensor 12 x 5: auto inner = my_ten.flat_inner_dims<T>(); // 2D Eigen::Tensor 4 x 15: auto outer = my_ten.shaped<T, 2>({4, 15}); // CHECK fails, bad num elements: auto outer = my_ten.shaped<T, 2>({4, 8}); // 3D Eigen::Tensor 6 x 5 x 2: auto weird = my_ten.shaped<T, 3>({6, 5, 2}); // CHECK fails, type mismatch: auto bad = my_ten.flat<int32>();
0 commit comments