TensorFlow: Remove old Env:: APIs that don't pass unique_ptr.
Also update RELEASE.md to forward port from 0.9 branch, and add this new 'breaking change to the API.' Change: 125465285
This commit is contained in:
parent
185c31a59a
commit
490afa9f42
53
RELEASE.md
53
RELEASE.md
@ -1,5 +1,58 @@
|
||||
# Changes Since Last Release
|
||||
|
||||
## Breaking Changes to the API
|
||||
* env.h replaces use of New*File() functions to use std::unique_ptr return
|
||||
arguments, removing the old raw pointer returns.
|
||||
|
||||
# Release 0.9.0
|
||||
|
||||
## Major Features and Improvements
|
||||
|
||||
* Python 3.5 support and binaries
|
||||
* Added iOS support
|
||||
* Added support for processing on GPUs on MacOS
|
||||
* Added makefile for better cross-platform build support (C API only)
|
||||
* fp16 support and improved complex128 support for many ops
|
||||
* Higher level functionality in contrib.{layers,losses,metrics,learn}
|
||||
* More features to Tensorboard
|
||||
* Improved support for string embedding and sparse features
|
||||
* The RNN api is finally "official" (see, e.g., `tf.nn.dynamic_rnn`,
|
||||
`tf.nn.rnn`, and the classes in `tf.nn.rnn_cell`).
|
||||
* TensorBoard now has an Audio Dashboard, with associated audio summaries.
|
||||
|
||||
## Big Fixes and Other Changes
|
||||
|
||||
* Turned on CuDNN Autotune.
|
||||
* Added support for using third-party Python optimization algorithms (contrib.opt).
|
||||
* Google Cloud Storage filesystem support.
|
||||
* HDF5 support
|
||||
* Add support for 3d convolutions and pooling.
|
||||
* Update gRPC release to 0.14.
|
||||
* Eigen version upgrade.
|
||||
* Switch to eigen thread pool
|
||||
* `tf.nn.moments()` now accepts a `shift` argument. Shifting by a good estimate
|
||||
of the mean improves numerical stability. Also changes the behavior of the
|
||||
`shift` argument to `tf.nn.sufficient_statistics()`.
|
||||
* Performance improvements
|
||||
* Many bugfixes
|
||||
* Many documentation fixes
|
||||
* TensorBoard fixes: graphs with only one data point, Nan values,
|
||||
reload button and auto-reload, tooltips in scalar charts, run
|
||||
filtering, stable colors
|
||||
* Tensorboard graph visualizer now supports run metadata. Clicking on nodes
|
||||
while viewing a stats for a particular run will show runtime statistics, such
|
||||
as memory or compute usage. Unused nodes will be faded out.
|
||||
|
||||
## Thanks to our Contributors
|
||||
|
||||
This release contains contributions from many people at Google, as well as:
|
||||
|
||||
Aaron Schumacher, Aidan Dang, Akihiko ITOH, Aki Sukegawa, Arbit Chen, Aziz Alto, Danijar Hafner, Erik Erwitt, Fabrizio Milo, Felix Maximilian Möller, Henry Saputra, Sung Kim, Igor Babuschkin, Jan Zikes, Jesper Steen Møller, Johannes Mayer, Justin Harris, Kashif Rasul, Kevin Robinson, Loo Rong Jie, Lucas Moura, Łukasz Bieniasz-Krzywiec, Mario Cho, Maxim Grechkin, Michael Heilman, Mostafa Rahmani, Mourad Mourafiq, @ninotoshi, Orion Reblitz-Richardson, Yuncheng Li, @raoqiyu, Robert DiPietro, Sam Abrahams, Sebastian Raschka, Siddharth Agrawal, @snakecharmer1024, Stephen Roller, Sung Kim, SunYeop Lee, Thijs Vogels, Till Hoffmann, Victor Melo, Ville Kallioniemi, Waleed Abdulla, Wenjian Huang, Yaroslav Bulatov, Yeison Rodriguez, Yuan (Terry) Tang, Yuxin Wu, @zhongzyd, Ziming Dong, Zohar Jackson
|
||||
|
||||
We are also grateful to all who filed issues or helped resolve them, asked and
|
||||
answered questions, and were part of inspiring discussions.
|
||||
|
||||
|
||||
## Features & Improvements
|
||||
* Connectionist Temporal Classification ops are now "official" (see, e.g.,
|
||||
`tf.nn.ctc_loss`)
|
||||
|
@ -112,47 +112,6 @@ Status Env::NewAppendableFile(const string& fname,
|
||||
return fs->NewAppendableFile(fname, result);
|
||||
}
|
||||
|
||||
/// Deprecated versions of factories.
|
||||
|
||||
Status Env::NewRandomAccessFile(const string& fname,
|
||||
RandomAccessFile** result) {
|
||||
FileSystem* fs;
|
||||
TF_RETURN_IF_ERROR(GetFileSystemForFile(fname, &fs));
|
||||
std::unique_ptr<RandomAccessFile> r;
|
||||
TF_RETURN_IF_ERROR(fs->NewRandomAccessFile(fname, &r));
|
||||
*result = r.release();
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
Status Env::NewAppendableFile(const string& fname, WritableFile** result) {
|
||||
FileSystem* fs;
|
||||
TF_RETURN_IF_ERROR(GetFileSystemForFile(fname, &fs));
|
||||
|
||||
std::unique_ptr<WritableFile> w;
|
||||
TF_RETURN_IF_ERROR(fs->NewAppendableFile(fname, &w));
|
||||
*result = w.release();
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
Status Env::NewWritableFile(const string& fname, WritableFile** result) {
|
||||
FileSystem* fs;
|
||||
TF_RETURN_IF_ERROR(GetFileSystemForFile(fname, &fs));
|
||||
std::unique_ptr<WritableFile> w;
|
||||
TF_RETURN_IF_ERROR(fs->NewWritableFile(fname, &w));
|
||||
*result = w.release();
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
Status Env::NewReadOnlyMemoryRegionFromFile(const string& fname,
|
||||
ReadOnlyMemoryRegion** result) {
|
||||
FileSystem* fs;
|
||||
TF_RETURN_IF_ERROR(GetFileSystemForFile(fname, &fs));
|
||||
std::unique_ptr<ReadOnlyMemoryRegion> r;
|
||||
TF_RETURN_IF_ERROR(fs->NewReadOnlyMemoryRegionFromFile(fname, &r));
|
||||
*result = r.release();
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
bool Env::FileExists(const string& fname) {
|
||||
FileSystem* fs;
|
||||
if (!GetFileSystemForFile(fname, &fs).ok()) {
|
||||
@ -213,7 +172,7 @@ Status ReadFileToString(Env* env, const string& fname, string* data) {
|
||||
if (!s.ok()) {
|
||||
return s;
|
||||
}
|
||||
RandomAccessFile* file;
|
||||
std::unique_ptr<RandomAccessFile> file;
|
||||
s = env->NewRandomAccessFile(fname, &file);
|
||||
if (!s.ok()) {
|
||||
return s;
|
||||
@ -233,13 +192,12 @@ Status ReadFileToString(Env* env, const string& fname, string* data) {
|
||||
} else {
|
||||
memmove(p, result.data(), result.size());
|
||||
}
|
||||
delete file;
|
||||
return s;
|
||||
}
|
||||
|
||||
Status WriteStringToFile(Env* env, const string& fname,
|
||||
const StringPiece& data) {
|
||||
WritableFile* file;
|
||||
std::unique_ptr<WritableFile> file;
|
||||
Status s = env->NewWritableFile(fname, &file);
|
||||
if (!s.ok()) {
|
||||
return s;
|
||||
@ -248,7 +206,6 @@ Status WriteStringToFile(Env* env, const string& fname,
|
||||
if (s.ok()) {
|
||||
s = file->Close();
|
||||
}
|
||||
delete file;
|
||||
return s;
|
||||
}
|
||||
|
||||
@ -292,13 +249,12 @@ class FileStream : public ::tensorflow::protobuf::io::ZeroCopyInputStream {
|
||||
|
||||
Status ReadBinaryProto(Env* env, const string& fname,
|
||||
::tensorflow::protobuf::MessageLite* proto) {
|
||||
RandomAccessFile* file;
|
||||
std::unique_ptr<RandomAccessFile> file;
|
||||
auto s = env->NewRandomAccessFile(fname, &file);
|
||||
if (!s.ok()) {
|
||||
return s;
|
||||
}
|
||||
std::unique_ptr<RandomAccessFile> file_holder(file);
|
||||
std::unique_ptr<FileStream> stream(new FileStream(file));
|
||||
std::unique_ptr<FileStream> stream(new FileStream(file.get()));
|
||||
|
||||
// TODO(jiayq): the following coded stream is for debugging purposes to allow
|
||||
// one to parse arbitrarily large messages for MessageLite. One most likely
|
||||
|
@ -86,8 +86,6 @@ class Env {
|
||||
/// shouldn't live longer than the Env object.
|
||||
Status NewRandomAccessFile(const string& fname,
|
||||
std::unique_ptr<RandomAccessFile>* result);
|
||||
// NOTE: To be removed, replace with unique_ptr interface above.
|
||||
Status NewRandomAccessFile(const string& fname, RandomAccessFile** result);
|
||||
|
||||
/// \brief Creates an object that writes to a new file with the specified
|
||||
/// name.
|
||||
@ -104,8 +102,6 @@ class Env {
|
||||
/// shouldn't live longer than the Env object.
|
||||
Status NewWritableFile(const string& fname,
|
||||
std::unique_ptr<WritableFile>* result);
|
||||
// NOTE: To be removed, replace with unique_ptr interface above.
|
||||
Status NewWritableFile(const string& fname, WritableFile** result);
|
||||
|
||||
/// \brief Creates an object that either appends to an existing file, or
|
||||
/// writes to a new file (if the file does not exist to begin with).
|
||||
@ -121,8 +117,6 @@ class Env {
|
||||
/// shouldn't live longer than the Env object.
|
||||
Status NewAppendableFile(const string& fname,
|
||||
std::unique_ptr<WritableFile>* result);
|
||||
// NOTE: To be removed, replace with unique_ptr interface above.
|
||||
Status NewAppendableFile(const string& fname, WritableFile** result);
|
||||
|
||||
/// \brief Creates a readonly region of memory with the file context.
|
||||
///
|
||||
@ -137,9 +131,6 @@ class Env {
|
||||
/// object shouldn't live longer than the Env object.
|
||||
Status NewReadOnlyMemoryRegionFromFile(
|
||||
const string& fname, std::unique_ptr<ReadOnlyMemoryRegion>* result);
|
||||
// NOTE: To be removed, replace with unique_ptr interface above.
|
||||
Status NewReadOnlyMemoryRegionFromFile(const string& fname,
|
||||
ReadOnlyMemoryRegion** result);
|
||||
|
||||
/// Returns true iff the named file exists.
|
||||
bool FileExists(const string& fname);
|
||||
|
Loading…
Reference in New Issue
Block a user