aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/cc/client
diff options
context:
space:
mode:
authorGravatar Skye Wanderman-Milne <skyewm@google.com>2017-01-17 13:35:16 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-01-17 13:48:24 -0800
commit7a0d788c2697af366c6814396ce07cfed7c4bd60 (patch)
tree382e9bc1e1553f848e57aa8237a6879f69d52b2e /tensorflow/cc/client
parentdbf4e01d6fbb7beb1ff2aed6d847da6605cb49e2 (diff)
Update C++ API comments to be more Doxygen friendly.
This patch: - Updates // comments to ///. I manually reverted some comments that shouldn't be docs (e.g. TODOs), but may have missed some. - Indents code blocks so they get formatted as such in the docs. - Removes /* */ comments from example code since it messes up Doxygen. - Puts a space between {{ and }} since it messes up devsite. - Adds some // START_SKIP_DOXYGEN and // END_SKIP_DOXYGEN comments for functions that aren't part of the public API (incomplete) This will likely require further small fixups, but this gets something to be generated. Change: 144749351
Diffstat (limited to 'tensorflow/cc/client')
-rw-r--r--tensorflow/cc/client/client_session.h59
1 files changed, 30 insertions, 29 deletions
diff --git a/tensorflow/cc/client/client_session.h b/tensorflow/cc/client/client_session.h
index 9d480477f6..a55d9a5a59 100644
--- a/tensorflow/cc/client/client_session.h
+++ b/tensorflow/cc/client/client_session.h
@@ -31,59 +31,60 @@ limitations under the License.
namespace tensorflow {
-// A `ClientSession` object lets the caller drive the evaluation of the
-// TensorFlow graph constructed with the C++ API.
-//
-// Example:
-//
-// Scope root = Scope::NewRootScope();
-// auto a = Placeholder(root, DT_INT32);
-// auto c = Add(root, a, {41});
-//
-// ClientSession session(root);
-// std::vector<Tensor> outputs;
-//
-// Status s = session.Run({{a, {1}}}, {c}, &outputs);
-// if (!s.ok()) { /* Handle error */ }
+/// A `ClientSession` object lets the caller drive the evaluation of the
+/// TensorFlow graph constructed with the C++ API.
+///
+/// Example:
+///
+/// Scope root = Scope::NewRootScope();
+/// auto a = Placeholder(root, DT_INT32);
+/// auto c = Add(root, a, {41});
+///
+/// ClientSession session(root);
+/// std::vector<Tensor> outputs;
+///
+/// Status s = session.Run({ {a, {1}} }, {c}, &outputs);
+/// if (!s.ok()) { ... }
class ClientSession {
public:
- // A data type to represent feeds to a Run call.
- // This is a map of `Output` objects returned by op-constructors to the value
- // to feed them with. See `ops::Input::Initializer` for details on what can be
- // used as feed values.
+ /// A data type to represent feeds to a Run call.
+ ///
+ /// This is a map of `Output` objects returned by op-constructors to the value
+ /// to feed them with. See `ops::Input::Initializer` for details on what can
+ /// be used as feed values.
typedef std::unordered_map<ops::Output, ops::Input::Initializer,
ops::OutputHash>
FeedType;
- // Create a new session to evaluate the graph contained in `scope` by
- // connecting to the TensorFlow runtime specified by `target`.
+ /// Create a new session to evaluate the graph contained in `scope` by
+ /// connecting to the TensorFlow runtime specified by `target`.
ClientSession(const Scope& scope, const string& target);
- // Same as above, but use the empty string ("") as the target specification.
+ /// Same as above, but use the empty string ("") as the target specification.
ClientSession(const Scope& scope);
- // Create a new session, configuring it with `session_options`.
+ /// Create a new session, configuring it with `session_options`.
ClientSession(const Scope& scope, const SessionOptions& session_options);
- // Evaluate the tensors in `fetch_outputs`. The values are returned as
- // `Tensor` objects in `outputs`. The number and order of `outputs` will match
- // `fetch_outputs`.
+ /// Evaluate the tensors in `fetch_outputs`. The values are returned as
+ /// `Tensor` objects in `outputs`. The number and order of `outputs` will
+ /// match `fetch_outputs`.
Status Run(const std::vector<ops::Output>& fetch_outputs,
std::vector<Tensor>* outputs) const;
- // Same as above, but use the mapping in `inputs` as feeds.
+ /// Same as above, but use the mapping in `inputs` as feeds.
Status Run(const FeedType& inputs,
const std::vector<ops::Output>& fetch_outputs,
std::vector<Tensor>* outputs) const;
- // Same as above. Additionally runs the operations ins `run_outputs`.
+ /// Same as above. Additionally runs the operations ins `run_outputs`.
Status Run(const FeedType& inputs,
const std::vector<ops::Output>& fetch_outputs,
const std::vector<ops::Operation>& run_outputs,
std::vector<Tensor>* outputs) const;
- // Use `run_options` to turn on performance profiling. `run_metadata`, if not
- // null, is filled in with the profiling results.
+ /// Use `run_options` to turn on performance profiling. `run_metadata`, if not
+ /// null, is filled in with the profiling results.
Status Run(const RunOptions& run_options, const FeedType& inputs,
const std::vector<ops::Output>& fetch_outputs,
const std::vector<ops::Operation>& run_outputs,