Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R1.0 #7587

Closed
wants to merge 41 commits into from
Closed

R1.0 #7587

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
59ad952
Remove access to individual sub-modules: only use the symbols importe…
tensorflower-gardener Jan 28, 2017
daa030e
Seal contrib interfaces (as much a feasible). If you were using a sym…
martinwicke Jan 30, 2017
b2215c8
Seal tf.contrib.framework.
martinwicke Jan 31, 2017
4ca79f6
tfdbg doc: move PNG image files to g3doc/images
caisq Feb 1, 2017
5a7babb
Merge pull request #7423 from caisq/doc-cp
caisq Feb 10, 2017
2d364af
Fix double evaluation of macro argument that was causing duplicate CU…
hawkinsp Feb 9, 2017
7aa125e
Merge branch 'r1.0' into seal-contrib
martinwicke Feb 11, 2017
80a5ffb
Merge pull request #7426 from yifeif/r1.0
yifeif Feb 11, 2017
ce1cbb5
Merge branch 'r1.0' into seal-contrib
yifeif Feb 11, 2017
4e20b47
Fix transform for cyclic graph.
tensorflower-gardener Jan 18, 2017
f3979c0
Fix transform for cyclic graph (second try). Deprecate in-place trans…
tensorflower-gardener Jan 26, 2017
779503f
Merge branch 'seal-contrib' of github.com:tensorflow/tensorflow into …
martinwicke Feb 11, 2017
810a476
Expose export-related utility functions under tf.contrib.learn
davidsoergel Jan 19, 2017
43df96a
Merge pull request #7427 from tensorflow/seal-contrib
yifeif Feb 11, 2017
47bba63
Update version string for 1.0.0.
yifeif Feb 11, 2017
07bb8ea
Update release note.
yifeif Feb 11, 2017
6636d79
C++ docs: add doxygen group annotations to source code
skye Feb 13, 2017
4fb692b
Documentation changes to adhere to new doc generator
aselle Feb 13, 2017
b6d328e
Update docs.
tensorflower-gardener Feb 13, 2017
2323ada
Remove @@__init__ from docstrings.
aselle Feb 13, 2017
0c930f0
Documentation changes to adhere to new doc generator
saeta Feb 13, 2017
aa6b837
Link docstrings to module guides and remove redundant text.
aselle Feb 13, 2017
c926b75
Doc fixit task 2.
Feb 13, 2017
b780726
Doc updates for Python IO, string, TensorArray, and summary ops
tensorflower-gardener Feb 14, 2017
31f3025
Update docs.
tensorflower-gardener Feb 14, 2017
6b0a5aa
Seal ffmpeg interface and fix document generator to use ffmpeg build …
aselle Feb 14, 2017
d315634
C++ API: clean up generated Attrs struct comments
skye Feb 14, 2017
11cb908
C++ API: include optional attrs in generated class comments + improve…
skye Feb 14, 2017
81bfd9b
TASK 1. Python module doc strings
tensorflower-gardener Feb 14, 2017
91c50b6
Drop reference to monitors guide.
tensorflower-gardener Feb 14, 2017
f63bb3a
tfdbg: adjust file paths after Python API seal to avoid import problems
caisq Feb 14, 2017
fc4e26d
Remove generator.py changes from cherrypicks.
yifeif Feb 14, 2017
5a60bb8
Remove unused debug_utils import in stepper.py.
yifeif Feb 14, 2017
dfaf790
Merge pull request #7505 from av8ramit/cherrypicks
yifeif Feb 14, 2017
04af672
Module docstring updates.
tensorflower-gardener Feb 14, 2017
40ec3db
Fix links according to new convention.
Feb 14, 2017
da8758b
Manual documentation fixes.
tensorflower-gardener Feb 14, 2017
419665f
Update Python doc strings for the new doc generator pipeline.
tensorflower-gardener Feb 14, 2017
9297393
Change to remove BUILD dependency on docs.
tensorflower-gardener Feb 11, 2017
8e51bfd
Add linking to methods, and warnings for links to things that are not
tensorflower-gardener Feb 12, 2017
16485a3
Merge pull request #7516 from av8ramit/cherrypicks_round2
yifeif Feb 15, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -33,10 +33,10 @@ and discussion.**

People who are a little more adventurous can also try our nightly binaries:

* Linux CPU-only: [Python 2](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=cpu-slave/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow-1.0.0rc2-cp27-none-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=cpu-slave)) / [Python 3.4](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=cpu-slave/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow-1.0.0rc2-cp34-cp34m-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=cpu-slave/)) / [Python 3.5](https://ci.tensorflow.org/view/Nightly/job/nightly-python35-linux-cpu/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow-1.0.0rc2-cp35-cp35m-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-python35-linux-cpu/))
* Linux GPU: [Python 2](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-linux-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=gpu-linux/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow_gpu-1.0.0rc2-cp27-none-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-linux-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=gpu-linux/)) / [Python 3.4](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-linux-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=gpu-linux/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow_gpu-1.0.0rc2-cp34-cp34m-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-linux-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=gpu-linux/)) / [Python 3.5](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-linux-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3.5,label=gpu-linux/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow_gpu-1.0.0rc2-cp35-cp35m-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-linux-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3.5,label=gpu-linux/))
* Mac CPU-only: [Python 2](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=mac-slave/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow-1.0.0rc2-py2-none-any.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=mac-slave/)) / [Python 3](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=mac-slave/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow-1.0.0rc2-py3-none-any.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=mac-slave/))
* Mac GPU: [Python 2](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-mac-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=gpu-mac/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow_gpu-1.0.0rc2-py2-none-any.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-mac-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=gpu-mac/)) / [Python 3](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-mac-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=gpu-mac/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow_gpu-1.0.0rc2-py3-none-any.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-mac-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=gpu-mac/))
* Linux CPU-only: [Python 2](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=cpu-slave/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow-1.0.0-cp27-none-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=cpu-slave)) / [Python 3.4](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=cpu-slave/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow-1.0.0-cp34-cp34m-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=cpu-slave/)) / [Python 3.5](https://ci.tensorflow.org/view/Nightly/job/nightly-python35-linux-cpu/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow-1.0.0-cp35-cp35m-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-python35-linux-cpu/))
* Linux GPU: [Python 2](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-linux-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=gpu-linux/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow_gpu-1.0.0-cp27-none-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-linux-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=gpu-linux/)) / [Python 3.4](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-linux-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=gpu-linux/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow_gpu-1.0.0-cp34-cp34m-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-linux-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=gpu-linux/)) / [Python 3.5](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-linux-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3.5,label=gpu-linux/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow_gpu-1.0.0-cp35-cp35m-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-linux-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3.5,label=gpu-linux/))
* Mac CPU-only: [Python 2](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=mac-slave/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow-1.0.0-py2-none-any.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=mac-slave/)) / [Python 3](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=mac-slave/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow-1.0.0-py3-none-any.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=mac-slave/))
* Mac GPU: [Python 2](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-mac-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=gpu-mac/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow_gpu-1.0.0-py2-none-any.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-mac-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=gpu-mac/)) / [Python 3](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-mac-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=gpu-mac/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow_gpu-1.0.0-py3-none-any.whl) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-mac-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=gpu-mac/))
* [Android](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-android/TF_BUILD_CONTAINER_TYPE=ANDROID,TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=NO_PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=android-slave/lastSuccessfulBuild/artifact/bazel-out/local_linux/bin/tensorflow/examples/android/tensorflow_demo.apk) ([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-android/TF_BUILD_CONTAINER_TYPE=ANDROID,TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=NO_PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=android-slave/))
* Android: [demo APK](https://ci.tensorflow.org/view/Nightly/job/nightly-android/lastSuccessfulBuild/artifact/out/tensorflow_demo.apk), [native libs](http://ci.tensorflow.org/view/Nightly/job/nightly-android/lastSuccessfulBuild/artifact/out/native/)
([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-android/))
Expand Down
2 changes: 2 additions & 0 deletions RELEASE.md
Expand Up @@ -87,6 +87,7 @@ To help you upgrade your existing TensorFlow Python code to match the API change
* Change arg order for `{softmax,sparse_softmax,sigmoid}_cross_entropy_with_logits` to be (labels, predictions), and force use of named args.

## Bug Fixes and Other Changes
* Numerous C++ API updates.
* New op: `parallel_stack`.
* Introducing common tf io compression options constants for
RecordReader/RecordWriter.
Expand Down Expand Up @@ -125,6 +126,7 @@ To help you upgrade your existing TensorFlow Python code to match the API change
* `tf.divide` now honors the name field.
* Make metrics weight broadcasting more strict.
* Add new queue-like `StagingArea` and new ops: `stage` and `unstage`.
* Enable inplace update ops for strings on CPU. Speed up string concat.

## Thanks to our Contributors

Expand Down
2 changes: 0 additions & 2 deletions tensorflow/BUILD
Expand Up @@ -194,8 +194,6 @@ filegroup(
"//tensorflow/examples/tutorials/estimators:all_files",
"//tensorflow/examples/tutorials/mnist:all_files",
"//tensorflow/examples/tutorials/word2vec:all_files",
"//tensorflow/g3doc/how_tos/adding_an_op:all_files",
"//tensorflow/g3doc/tutorials:all_files",
"//tensorflow/go:all_files",
"//tensorflow/java:all_files",
"//tensorflow/java/src/main/java/org/tensorflow/examples:all_files",
Expand Down
5 changes: 5 additions & 0 deletions tensorflow/cc/client/client_session.h
Expand Up @@ -31,6 +31,9 @@ limitations under the License.

namespace tensorflow {

/// @addtogroup core
/// @{

/// A `ClientSession` object lets the caller drive the evaluation of the
/// TensorFlow graph constructed with the C++ API.
///
Expand Down Expand Up @@ -101,6 +104,8 @@ class ClientSession {
TF_DISALLOW_COPY_AND_ASSIGN(ClientSession);
};

/// @}

} // end namespace tensorflow

#endif // TENSORFLOW_CC_CLIENT_CLIENT_SESSION_H_
86 changes: 66 additions & 20 deletions tensorflow/cc/framework/cc_op_gen.cc
Expand Up @@ -57,6 +57,16 @@ string GetPath(const string& dot_h_fname) {
return result;
}

// Converts: some/path/to/file.xx
// to: file
// (note that suffix is removed)
string GetFilename(const string& path) {
size_t slash_pos = path.rfind('/');
if (slash_pos == path.npos) slash_pos = -1;
size_t dot_pos = path.rfind('.');
return path.substr(slash_pos + 1, dot_pos - (slash_pos + 1));
}

// Converts:
// cc/ops/gen_foo_ops.h
// to:
Expand All @@ -77,6 +87,17 @@ string ToGuard(const string& path) {
return guard;
}

// Converts: some_name_xyz
// to: Some Name Xyz
string ToTitle(const string& name) {
string title = name;
for (int i = 0; i < title.size(); ++i) {
if (title[i] == '_') title[i] = ' ';
}
str_util::TitlecaseString(&title, " ");
return title;
}

// Change: Into:
// ABC /// ABC
// ///
Expand Down Expand Up @@ -416,6 +437,7 @@ OpInfo::OpInfo(const OpDef& g_op_def, const OpDef& i_op_def,
}
strings::StrAppend(&comment, "\nArguments:\n* scope: A Scope object\n");

// Process inputs
for (int i = 0; i < op_def.input_arg_size(); ++i) {
const auto& arg(op_def.input_arg(i));
arg_types.push_back(strings::StrCat(
Expand All @@ -430,30 +452,45 @@ OpInfo::OpInfo(const OpDef& g_op_def, const OpDef& i_op_def,
arg.description(), "\n");
}
}

// Process attrs
string required_attrs_comment;
string optional_attrs_comment;
for (int i = 0; i < op_def.attr_size(); ++i) {
const auto& attr(op_def.attr(i));
// If the attr is going to be inferred or is optional, don't add it as a
// required argument.
if ((inferred_input_attrs.find(attr.name()) !=
inferred_input_attrs.end()) ||
attr.has_default_value()) {
continue;
}
// Skip inferred arguments
if (inferred_input_attrs.count(attr.name()) > 0) continue;

const auto entry = AttrTypeName(attr.type());
const auto attr_type_name = entry.first;
const bool use_const = entry.second;
string attr_name = AvoidCPPKeywords(attr.name());

arg_types.push_back(strings::StrCat(use_const ? "const " : "",
attr_type_name, use_const ? "&" : ""));
arg_names.push_back(AvoidCPPKeywords(attr.name()));
string attr_comment;
if (!attr.description().empty()) {
strings::StrAppend(&comment, "* ", AvoidCPPKeywords(attr.name()), ":\n");
// TODO(keveman): Word wrap and indent this, to handle multi-line
// descriptions.
strings::StrAppend(&comment, " ", attr.description(), "\n");
strings::StrAppend(&attr_comment, "* ", attr_name, ": ",
attr.description(), "\n");
}
if (attr.has_default_value()) {
strings::StrAppend(&optional_attrs_comment, attr_comment);
} else {
strings::StrAppend(&required_attrs_comment, attr_comment);
arg_types.push_back(strings::StrCat(
use_const ? "const " : "", attr_type_name, use_const ? "&" : ""));
arg_names.push_back(attr_name);
}
}

strings::StrAppend(&comment, required_attrs_comment);

if (!optional_attrs_comment.empty()) {
strings::StrAppend(&comment, "\nOptional attributes (see `Attrs`):\n");
strings::StrAppend(&comment, optional_attrs_comment);
}

// Process outputs
for (int i = 0; i < op_def.output_arg_size(); ++i) {
const auto& arg = op_def.output_arg(i);
bool is_list = ArgIsList(arg);
Expand Down Expand Up @@ -509,8 +546,6 @@ OpInfo::OpInfo(const OpDef& g_op_def, const OpDef& i_op_def,
string OpInfo::GetOpAttrStruct() const {
string struct_fields;
string setters;
string attrs_comment =
strings::StrCat("Optional attribute setters for ", op_name, " :\n\n");

for (int i = 0; i < op_def.attr_size(); ++i) {
const auto& attr(op_def.attr(i));
Expand All @@ -531,13 +566,15 @@ string OpInfo::GetOpAttrStruct() const {
strings::StrCat(camel_case_name, suffix, "(", use_const ? "const " : "",
attr_type_name, use_const ? "&" : "");

strings::StrAppend(&attrs_comment, attr_func_def, "): Defaults to ",
SummarizeAttrValue(attr.default_value()), "\n");
string attr_comment;
if (!attr.description().empty()) {
// TODO(keveman): Word wrap and indent this to handle multi-line
// description.
strings::StrAppend(&attrs_comment, " ", attr.description(), "\n");
strings::StrAppend(&attr_comment, attr.description(), "\n\n");
}
strings::StrAppend(&attr_comment, "Defaults to ",
SummarizeAttrValue(attr.default_value()), "\n");
attr_comment = MakeComment(attr_comment, " ");

strings::StrAppend(&setters, attr_comment);
strings::StrAppend(&setters, " Attrs ", attr_func_def, " x) {\n");
strings::StrAppend(&setters, " Attrs ret = *this;\n");
strings::StrAppend(&setters, " ret.", attr.name(), "_ = x;\n");
Expand All @@ -552,6 +589,8 @@ string OpInfo::GetOpAttrStruct() const {
return "";
}

string attrs_comment =
strings::StrCat("Optional attribute setters for ", op_name, "\n");
string struct_decl = MakeComment(attrs_comment, " ");
strings::StrAppend(&struct_decl, " struct Attrs {\n");
strings::StrAppend(&struct_decl, setters, struct_fields);
Expand Down Expand Up @@ -841,6 +880,10 @@ namespace ops {
)include",
"#include \"", op_header, "\"\n", namespace_begin);

const string filename = GetFilename(dot_h_fname);
const string doxygen = strings::StrCat("/// @defgroup ", filename, " ",
ToTitle(filename), "\n", "/// @{\n\n");

TF_CHECK_OK(h->Append(
strings::StrCat("// This file is MACHINE GENERATED! Do not edit.\n\n"
"#ifndef ",
Expand All @@ -850,6 +893,7 @@ namespace ops {
*op_header_guard, "\n\n")));
TF_CHECK_OK(h->Append(header));
TF_CHECK_OK(h->Append(namespace_begin));
TF_CHECK_OK(h->Append(doxygen));
TF_CHECK_OK(cc->Append(cc_header));
}

Expand All @@ -860,7 +904,9 @@ void FinishFiles(bool internal, WritableFile* h, WritableFile* cc,
} // namespace tensorflow
)footer"
:
R"footer(} // namespace ops
R"footer(/// @}

} // namespace ops
} // namespace tensorflow
)footer";

Expand Down
10 changes: 10 additions & 0 deletions tensorflow/cc/framework/ops.h
Expand Up @@ -26,8 +26,13 @@ limitations under the License.

namespace tensorflow {

/// @defgroup core Core Tensorflow API

class Output;

/// @addtogroup core
/// @{

/// Represents a node in the computation graph.
class Operation {
public:
Expand Down Expand Up @@ -80,6 +85,7 @@ class Output {
int64 index_ = 0;
};

/// Hash class that can be used for e.g. storing Outputs in an unordered_map
struct OutputHash {
std::size_t operator()(const Output& output) const {
return Hash64Combine(std::hash<Node*>()(output.node()),
Expand Down Expand Up @@ -161,6 +167,7 @@ class Input {
/// initializer list is indeed a valid multi-dimensional tensor.
Initializer(const std::initializer_list<Initializer>& v);

// START_SKIP_DOXYGEN
template <typename T, bool = std::is_convertible<T, string>::value>
struct RealType {
typedef string type;
Expand All @@ -170,6 +177,7 @@ class Input {
struct RealType<T, false> {
typedef T type;
};
// END_SKIP_DOXYGEN

TensorProto AsTensorProto() {
TensorProto tensor_proto;
Expand Down Expand Up @@ -284,6 +292,8 @@ class InputList {
std::vector<Input> inputs_;
};

/// @}

} // namespace tensorflow

#endif // THIRD_PARTY_TENSORFLOW_CC_FRAMEWORK_OPS_H_
5 changes: 5 additions & 0 deletions tensorflow/cc/framework/scope.h
Expand Up @@ -33,6 +33,9 @@ class GraphDef;
class NodeBuilder;
struct CompositeOpScopes;

/// @addtogroup core
/// @{

/// A `Scope` object represents a set of related TensorFlow ops that have the
/// same properties such as a common name prefix.
///
Expand Down Expand Up @@ -273,6 +276,8 @@ struct CompositeOpScopes {
Scope last;
};

/// @}

} // namespace tensorflow

#endif // THIRD_PARTY_TENSORFLOW_CC_FRAMEWORK_SCOPE_H_
5 changes: 5 additions & 0 deletions tensorflow/cc/ops/const_op.h
Expand Up @@ -23,6 +23,9 @@ limitations under the License.
namespace tensorflow {
namespace ops {

/// @defgroup const_op Const Op
/// @{

Output Const(const Scope& scope, const Input::Initializer& val);

NodeBuilder::NodeOut AsNodeOut(const Scope& scope, const Input& inp);
Expand Down Expand Up @@ -70,6 +73,8 @@ Output Const(const Scope& scope, const std::initializer_list<T>& v,
std::vector<NodeBuilder::NodeOut> AsNodeOutList(const Scope& scope,
const InputList& inp);

/// }@

} // namespace ops
} // namespace tensorflow

Expand Down
4 changes: 4 additions & 0 deletions tensorflow/contrib/__init__.py
Expand Up @@ -58,3 +58,7 @@
from tensorflow.contrib import util
from tensorflow.contrib.ndlstm import python as ndlstm
from tensorflow.contrib.specs import python as specs

del absolute_import
del division
del print_function
10 changes: 10 additions & 0 deletions tensorflow/contrib/bayesflow/__init__.py
Expand Up @@ -30,3 +30,13 @@
from tensorflow.contrib.bayesflow.python.ops import stochastic_variables
from tensorflow.contrib.bayesflow.python.ops import variational_inference
# pylint: enable=unused-import,line-too-long

from tensorflow.python.util.all_util import remove_undocumented


_allowed_symbols = ['entropy', 'monte_carlo',
'special_math', 'stochastic_gradient_estimators',
'stochastic_graph', 'stochastic_tensor',
'stochastic_variables', 'variational_inference']

remove_undocumented(__name__, _allowed_symbols)