Skip to content

Commit fecd208

Browse files
committed
添加原文文件
1 parent 5cb35a0 commit fecd208

File tree

175 files changed

+28732
-14
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

175 files changed

+28732
-14
lines changed

README.md

+41-7
Original file line numberDiff line numberDiff line change
@@ -50,21 +50,55 @@
5050
- 使用Markdown进行翻译,文件名必须使用英文
5151
- 翻译后的文档请放到SOURCE文件夹下的对应章节中,然后pull request即可
5252
- 如遇到文中的图片,请统一放在SOURCE/images目录下
53+
- 原文中的HTML标签及代码请不要修改、翻译
5354
- 有其他任何问题都欢迎发issue,我们看到了会尽快回复
55+
- 翻译人员需将对应的原文地址和翻译人姓名添加到译文末尾,审校人员需要将自己的名字添加到译文末尾,具体格式请参见样例:
5456

55-
## 参与者(按认领章节排序)
57+
> 原文:[Color Palettes](http://www.google.com/design/spec/resources/color-palettes.html) 翻译:[iceskysl](https://github.com/iceskysl) 校对:[PoppinLp](https://github.com/poppinlp)
5658
57-
### 翻译
5859

59-
- About Swift ([xtymichael](https://github.com/xtymichael)
60+
## 参与者(按认领章节排序
6061

61-
62+
### 翻译
63+
- 起步
64+
- [介绍](SOURCE/get_started/introduction.md)[示例人名](https://github.com/xxx)
65+
- [下载及安装](SOURCE/get_started/os_setup.md)
66+
- [基本用法](SOURCE/get_started/basic_usage.md)
67+
- 教程
68+
- [Overview](SOURCE/tutorials/overview.md)
69+
- [MNIST For ML Beginners](SOURCE/tutorials/mnist_beginners.md)
70+
- [Deep MNIST for Expert](SOURCE/tutorials/mnist_pros.md)
71+
- [TensorFlow Mechanics 101](SOURCE/tutorials/mnist_tf.md)
72+
- [Convolutional Neural Networks](SOURCE/tutorials/deep_cnn.md)
73+
- [Vector Representations of Words](SOURCE/tutorials/word2vec.md)
74+
- [Vector Representations of Words](SOURCE/tutorials/word2vec.md)
75+
- [Recurrent Neural Networks](SOURCE/tutorials/recurrent.md)
76+
- [Mandelbrot Set](SOURCE/tutorials/mandelbrot.md)
77+
- [Partial Differential Equations](SOURCE/tutorials/pdes.md)
78+
- [MNIST Data Download](SOURCE/tutorials/mnist_download.md)
79+
80+
(后续章节在添加中)
6281

6382
### 校对
6483

65-
- About Swift [xxx](https://github.com/xxx)
66-
67-
84+
- 起步
85+
- [介绍](SOURCE/get_started/introduction.md)[示例人名](https://github.com/xxx)
86+
- [下载及安装](SOURCE/get_started/os_setup.md)
87+
- [基本用法](SOURCE/get_started/basic_usage.md)
88+
- 教程
89+
- [Overview](SOURCE/tutorials/overview.md)
90+
- [MNIST For ML Beginners](SOURCE/tutorials/mnist_beginners.md)
91+
- [Deep MNIST for Expert](SOURCE/tutorials/mnist_pros.md)
92+
- [TensorFlow Mechanics 101](SOURCE/tutorials/mnist_tf.md)
93+
- [Convolutional Neural Networks](SOURCE/tutorials/deep_cnn.md)
94+
- [Vector Representations of Words](SOURCE/tutorials/word2vec.md)
95+
- [Vector Representations of Words](SOURCE/tutorials/word2vec.md)
96+
- [Recurrent Neural Networks](SOURCE/tutorials/recurrent.md)
97+
- [Mandelbrot Set](SOURCE/tutorials/mandelbrot.md)
98+
- [Partial Differential Equations](SOURCE/tutorials/pdes.md)
99+
- [MNIST Data Download](SOURCE/tutorials/mnist_download.md)
100+
101+
(后续章节在添加中)
68102

69103
## 进度记录
70104

SOURCE/api_docs/cc/ClassEnv.md

+146
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
# Class `tensorflow::Env` <a class="md-anchor" id="AUTOGENERATED-class--tensorflow--env-"></a>
2+
3+
An interface used by the tensorflow implementation to access operating system functionality like the filesystem etc.
4+
5+
Callers may wish to provide a custom Env object to get fine grain control.
6+
7+
All Env implementations are safe for concurrent access from multiple threads without any external synchronization.
8+
9+
##Member Summary <a class="md-anchor" id="AUTOGENERATED-member-summary"></a>
10+
11+
* [`tensorflow::Env::Env()`](#tensorflow_Env_Env)
12+
* [`virtual tensorflow::Env::~Env()`](#virtual_tensorflow_Env_Env)
13+
* [`virtual Status tensorflow::Env::NewRandomAccessFile(const string &fname, RandomAccessFile **result)=0`](#virtual_Status_tensorflow_Env_NewRandomAccessFile)
14+
* Creates a brand new random access read-only file with the specified name.
15+
* [`virtual Status tensorflow::Env::NewWritableFile(const string &fname, WritableFile **result)=0`](#virtual_Status_tensorflow_Env_NewWritableFile)
16+
* Creates an object that writes to a new file with the specified name.
17+
* [`virtual Status tensorflow::Env::NewAppendableFile(const string &fname, WritableFile **result)=0`](#virtual_Status_tensorflow_Env_NewAppendableFile)
18+
* 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).
19+
* [`virtual bool tensorflow::Env::FileExists(const string &fname)=0`](#virtual_bool_tensorflow_Env_FileExists)
20+
* Returns true iff the named file exists.
21+
* [`virtual Status tensorflow::Env::GetChildren(const string &dir, std::vector< string > *result)=0`](#virtual_Status_tensorflow_Env_GetChildren)
22+
* Stores in *result the names of the children of the specified directory. The names are relative to "dir".
23+
* [`virtual Status tensorflow::Env::DeleteFile(const string &fname)=0`](#virtual_Status_tensorflow_Env_DeleteFile)
24+
* Deletes the named file.
25+
* [`virtual Status tensorflow::Env::CreateDir(const string &dirname)=0`](#virtual_Status_tensorflow_Env_CreateDir)
26+
* Creates the specified directory.
27+
* [`virtual Status tensorflow::Env::DeleteDir(const string &dirname)=0`](#virtual_Status_tensorflow_Env_DeleteDir)
28+
* Deletes the specified directory.
29+
* [`virtual Status tensorflow::Env::GetFileSize(const string &fname, uint64 *file_size)=0`](#virtual_Status_tensorflow_Env_GetFileSize)
30+
* Stores the size of fname in *file_size.
31+
* [`virtual Status tensorflow::Env::RenameFile(const string &src, const string &target)=0`](#virtual_Status_tensorflow_Env_RenameFile)
32+
* Renames file src to target. If target already exists, it will be replaced.
33+
* [`virtual uint64 tensorflow::Env::NowMicros()=0`](#virtual_uint64_tensorflow_Env_NowMicros)
34+
* Returns the number of micro-seconds since some fixed point in time. Only useful for computing deltas of time.
35+
* [`virtual void tensorflow::Env::SleepForMicroseconds(int micros)=0`](#virtual_void_tensorflow_Env_SleepForMicroseconds)
36+
* Sleeps/delays the thread for the prescribed number of micro-seconds.
37+
* [`virtual Thread* tensorflow::Env::StartThread(const ThreadOptions &thread_options, const string &name, std::function< void()> fn) TF_MUST_USE_RESULT=0`](#virtual_Thread_tensorflow_Env_StartThread)
38+
* Returns a new thread that is running fn() and is identified (for debugging/performance-analysis) by "name".
39+
* [`static Env* tensorflow::Env::Default()`](#static_Env_tensorflow_Env_Default)
40+
* Returns a default environment suitable for the current operating system.
41+
42+
##Member Details <a class="md-anchor" id="AUTOGENERATED-member-details"></a>
43+
44+
#### `tensorflow::Env::Env()` <a class="md-anchor" id="tensorflow_Env_Env"></a>
45+
46+
47+
48+
49+
50+
#### `virtual tensorflow::Env::~Env()` <a class="md-anchor" id="virtual_tensorflow_Env_Env"></a>
51+
52+
53+
54+
55+
56+
#### `virtual Status tensorflow::Env::NewRandomAccessFile(const string &fname, RandomAccessFile **result)=0` <a class="md-anchor" id="virtual_Status_tensorflow_Env_NewRandomAccessFile"></a>
57+
58+
Creates a brand new random access read-only file with the specified name.
59+
60+
On success, stores a pointer to the new file in *result and returns OK. On failure stores NULL in *result and returns non-OK. If the file does not exist, returns a non-OK status.
61+
62+
The returned file may be concurrently accessed by multiple threads.
63+
64+
#### `virtual Status tensorflow::Env::NewWritableFile(const string &fname, WritableFile **result)=0` <a class="md-anchor" id="virtual_Status_tensorflow_Env_NewWritableFile"></a>
65+
66+
Creates an object that writes to a new file with the specified name.
67+
68+
Deletes any existing file with the same name and creates a new file. On success, stores a pointer to the new file in *result and returns OK. On failure stores NULL in *result and returns non-OK.
69+
70+
The returned file will only be accessed by one thread at a time.
71+
72+
#### `virtual Status tensorflow::Env::NewAppendableFile(const string &fname, WritableFile **result)=0` <a class="md-anchor" id="virtual_Status_tensorflow_Env_NewAppendableFile"></a>
73+
74+
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).
75+
76+
On success, stores a pointer to the new file in *result and returns OK. On failure stores NULL in *result and returns non-OK.
77+
78+
The returned file will only be accessed by one thread at a time.
79+
80+
#### `virtual bool tensorflow::Env::FileExists(const string &fname)=0` <a class="md-anchor" id="virtual_bool_tensorflow_Env_FileExists"></a>
81+
82+
Returns true iff the named file exists.
83+
84+
85+
86+
#### `virtual Status tensorflow::Env::GetChildren(const string &dir, std::vector< string > *result)=0` <a class="md-anchor" id="virtual_Status_tensorflow_Env_GetChildren"></a>
87+
88+
Stores in *result the names of the children of the specified directory. The names are relative to "dir".
89+
90+
Original contents of *results are dropped.
91+
92+
#### `virtual Status tensorflow::Env::DeleteFile(const string &fname)=0` <a class="md-anchor" id="virtual_Status_tensorflow_Env_DeleteFile"></a>
93+
94+
Deletes the named file.
95+
96+
97+
98+
#### `virtual Status tensorflow::Env::CreateDir(const string &dirname)=0` <a class="md-anchor" id="virtual_Status_tensorflow_Env_CreateDir"></a>
99+
100+
Creates the specified directory.
101+
102+
103+
104+
#### `virtual Status tensorflow::Env::DeleteDir(const string &dirname)=0` <a class="md-anchor" id="virtual_Status_tensorflow_Env_DeleteDir"></a>
105+
106+
Deletes the specified directory.
107+
108+
109+
110+
#### `virtual Status tensorflow::Env::GetFileSize(const string &fname, uint64 *file_size)=0` <a class="md-anchor" id="virtual_Status_tensorflow_Env_GetFileSize"></a>
111+
112+
Stores the size of fname in *file_size.
113+
114+
115+
116+
#### `virtual Status tensorflow::Env::RenameFile(const string &src, const string &target)=0` <a class="md-anchor" id="virtual_Status_tensorflow_Env_RenameFile"></a>
117+
118+
Renames file src to target. If target already exists, it will be replaced.
119+
120+
121+
122+
#### `virtual uint64 tensorflow::Env::NowMicros()=0` <a class="md-anchor" id="virtual_uint64_tensorflow_Env_NowMicros"></a>
123+
124+
Returns the number of micro-seconds since some fixed point in time. Only useful for computing deltas of time.
125+
126+
127+
128+
#### `virtual void tensorflow::Env::SleepForMicroseconds(int micros)=0` <a class="md-anchor" id="virtual_void_tensorflow_Env_SleepForMicroseconds"></a>
129+
130+
Sleeps/delays the thread for the prescribed number of micro-seconds.
131+
132+
133+
134+
#### `virtual Thread* tensorflow::Env::StartThread(const ThreadOptions &thread_options, const string &name, std::function< void()> fn) TF_MUST_USE_RESULT=0` <a class="md-anchor" id="virtual_Thread_tensorflow_Env_StartThread"></a>
135+
136+
Returns a new thread that is running fn() and is identified (for debugging/performance-analysis) by "name".
137+
138+
Caller takes ownership of the result and must delete it eventually (the deletion will block until fn() stops running).
139+
140+
#### `static Env* tensorflow::Env::Default()` <a class="md-anchor" id="static_Env_tensorflow_Env_Default"></a>
141+
142+
Returns a default environment suitable for the current operating system.
143+
144+
Sophisticated users may wish to provide their own Env implementation instead of relying on this default environment.
145+
146+
The result of Default() belongs to this library and must never be deleted.

SOURCE/api_docs/cc/ClassEnvWrapper.md

+143
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
# Class `tensorflow::EnvWrapper` <a class="md-anchor" id="AUTOGENERATED-class--tensorflow--envwrapper-"></a>
2+
3+
An implementation of Env that forwards all calls to another Env .
4+
5+
May be useful to clients who wish to override just part of the functionality of another Env .
6+
7+
##Member Summary <a class="md-anchor" id="AUTOGENERATED-member-summary"></a>
8+
9+
* [`tensorflow::EnvWrapper::EnvWrapper(Env *t)`](#tensorflow_EnvWrapper_EnvWrapper)
10+
* Initializes an EnvWrapper that delegates all calls to *t.
11+
* [`virtual tensorflow::EnvWrapper::~EnvWrapper()`](#virtual_tensorflow_EnvWrapper_EnvWrapper)
12+
* [`Env* tensorflow::EnvWrapper::target() const`](#Env_tensorflow_EnvWrapper_target)
13+
* Returns the target to which this Env forwards all calls.
14+
* [`Status tensorflow::EnvWrapper::NewRandomAccessFile(const string &f, RandomAccessFile **r) override`](#Status_tensorflow_EnvWrapper_NewRandomAccessFile)
15+
* Creates a brand new random access read-only file with the specified name.
16+
* [`Status tensorflow::EnvWrapper::NewWritableFile(const string &f, WritableFile **r) override`](#Status_tensorflow_EnvWrapper_NewWritableFile)
17+
* Creates an object that writes to a new file with the specified name.
18+
* [`Status tensorflow::EnvWrapper::NewAppendableFile(const string &f, WritableFile **r) override`](#Status_tensorflow_EnvWrapper_NewAppendableFile)
19+
* 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).
20+
* [`bool tensorflow::EnvWrapper::FileExists(const string &f) override`](#bool_tensorflow_EnvWrapper_FileExists)
21+
* Returns true iff the named file exists.
22+
* [`Status tensorflow::EnvWrapper::GetChildren(const string &dir, std::vector< string > *r) override`](#Status_tensorflow_EnvWrapper_GetChildren)
23+
* Stores in *result the names of the children of the specified directory. The names are relative to "dir".
24+
* [`Status tensorflow::EnvWrapper::DeleteFile(const string &f) override`](#Status_tensorflow_EnvWrapper_DeleteFile)
25+
* Deletes the named file.
26+
* [`Status tensorflow::EnvWrapper::CreateDir(const string &d) override`](#Status_tensorflow_EnvWrapper_CreateDir)
27+
* Creates the specified directory.
28+
* [`Status tensorflow::EnvWrapper::DeleteDir(const string &d) override`](#Status_tensorflow_EnvWrapper_DeleteDir)
29+
* Deletes the specified directory.
30+
* [`Status tensorflow::EnvWrapper::GetFileSize(const string &f, uint64 *s) override`](#Status_tensorflow_EnvWrapper_GetFileSize)
31+
* Stores the size of fname in *file_size.
32+
* [`Status tensorflow::EnvWrapper::RenameFile(const string &s, const string &t) override`](#Status_tensorflow_EnvWrapper_RenameFile)
33+
* Renames file src to target. If target already exists, it will be replaced.
34+
* [`uint64 tensorflow::EnvWrapper::NowMicros() override`](#uint64_tensorflow_EnvWrapper_NowMicros)
35+
* Returns the number of micro-seconds since some fixed point in time. Only useful for computing deltas of time.
36+
* [`void tensorflow::EnvWrapper::SleepForMicroseconds(int micros) override`](#void_tensorflow_EnvWrapper_SleepForMicroseconds)
37+
* Sleeps/delays the thread for the prescribed number of micro-seconds.
38+
* [`Thread* tensorflow::EnvWrapper::StartThread(const ThreadOptions &thread_options, const string &name, std::function< void()> fn) override`](#Thread_tensorflow_EnvWrapper_StartThread)
39+
* Returns a new thread that is running fn() and is identified (for debugging/performance-analysis) by "name".
40+
41+
##Member Details <a class="md-anchor" id="AUTOGENERATED-member-details"></a>
42+
43+
#### `tensorflow::EnvWrapper::EnvWrapper(Env *t)` <a class="md-anchor" id="tensorflow_EnvWrapper_EnvWrapper"></a>
44+
45+
Initializes an EnvWrapper that delegates all calls to *t.
46+
47+
48+
49+
#### `virtual tensorflow::EnvWrapper::~EnvWrapper()` <a class="md-anchor" id="virtual_tensorflow_EnvWrapper_EnvWrapper"></a>
50+
51+
52+
53+
54+
55+
#### `Env* tensorflow::EnvWrapper::target() const` <a class="md-anchor" id="Env_tensorflow_EnvWrapper_target"></a>
56+
57+
Returns the target to which this Env forwards all calls.
58+
59+
60+
61+
#### `Status tensorflow::EnvWrapper::NewRandomAccessFile(const string &f, RandomAccessFile **r) override` <a class="md-anchor" id="Status_tensorflow_EnvWrapper_NewRandomAccessFile"></a>
62+
63+
Creates a brand new random access read-only file with the specified name.
64+
65+
On success, stores a pointer to the new file in *result and returns OK. On failure stores NULL in *result and returns non-OK. If the file does not exist, returns a non-OK status.
66+
67+
The returned file may be concurrently accessed by multiple threads.
68+
69+
#### `Status tensorflow::EnvWrapper::NewWritableFile(const string &f, WritableFile **r) override` <a class="md-anchor" id="Status_tensorflow_EnvWrapper_NewWritableFile"></a>
70+
71+
Creates an object that writes to a new file with the specified name.
72+
73+
Deletes any existing file with the same name and creates a new file. On success, stores a pointer to the new file in *result and returns OK. On failure stores NULL in *result and returns non-OK.
74+
75+
The returned file will only be accessed by one thread at a time.
76+
77+
#### `Status tensorflow::EnvWrapper::NewAppendableFile(const string &f, WritableFile **r) override` <a class="md-anchor" id="Status_tensorflow_EnvWrapper_NewAppendableFile"></a>
78+
79+
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).
80+
81+
On success, stores a pointer to the new file in *result and returns OK. On failure stores NULL in *result and returns non-OK.
82+
83+
The returned file will only be accessed by one thread at a time.
84+
85+
#### `bool tensorflow::EnvWrapper::FileExists(const string &f) override` <a class="md-anchor" id="bool_tensorflow_EnvWrapper_FileExists"></a>
86+
87+
Returns true iff the named file exists.
88+
89+
90+
91+
#### `Status tensorflow::EnvWrapper::GetChildren(const string &dir, std::vector< string > *r) override` <a class="md-anchor" id="Status_tensorflow_EnvWrapper_GetChildren"></a>
92+
93+
Stores in *result the names of the children of the specified directory. The names are relative to "dir".
94+
95+
Original contents of *results are dropped.
96+
97+
#### `Status tensorflow::EnvWrapper::DeleteFile(const string &f) override` <a class="md-anchor" id="Status_tensorflow_EnvWrapper_DeleteFile"></a>
98+
99+
Deletes the named file.
100+
101+
102+
103+
#### `Status tensorflow::EnvWrapper::CreateDir(const string &d) override` <a class="md-anchor" id="Status_tensorflow_EnvWrapper_CreateDir"></a>
104+
105+
Creates the specified directory.
106+
107+
108+
109+
#### `Status tensorflow::EnvWrapper::DeleteDir(const string &d) override` <a class="md-anchor" id="Status_tensorflow_EnvWrapper_DeleteDir"></a>
110+
111+
Deletes the specified directory.
112+
113+
114+
115+
#### `Status tensorflow::EnvWrapper::GetFileSize(const string &f, uint64 *s) override` <a class="md-anchor" id="Status_tensorflow_EnvWrapper_GetFileSize"></a>
116+
117+
Stores the size of fname in *file_size.
118+
119+
120+
121+
#### `Status tensorflow::EnvWrapper::RenameFile(const string &s, const string &t) override` <a class="md-anchor" id="Status_tensorflow_EnvWrapper_RenameFile"></a>
122+
123+
Renames file src to target. If target already exists, it will be replaced.
124+
125+
126+
127+
#### `uint64 tensorflow::EnvWrapper::NowMicros() override` <a class="md-anchor" id="uint64_tensorflow_EnvWrapper_NowMicros"></a>
128+
129+
Returns the number of micro-seconds since some fixed point in time. Only useful for computing deltas of time.
130+
131+
132+
133+
#### `void tensorflow::EnvWrapper::SleepForMicroseconds(int micros) override` <a class="md-anchor" id="void_tensorflow_EnvWrapper_SleepForMicroseconds"></a>
134+
135+
Sleeps/delays the thread for the prescribed number of micro-seconds.
136+
137+
138+
139+
#### `Thread* tensorflow::EnvWrapper::StartThread(const ThreadOptions &thread_options, const string &name, std::function< void()> fn) override` <a class="md-anchor" id="Thread_tensorflow_EnvWrapper_StartThread"></a>
140+
141+
Returns a new thread that is running fn() and is identified (for debugging/performance-analysis) by "name".
142+
143+
Caller takes ownership of the result and must delete it eventually (the deletion will block until fn() stops running).

0 commit comments

Comments
 (0)