Skip to content

Commit 0b70bd8

Browse files
authored
Merge pull request tensorflow#3572 from gunan/r0.10
Update documentation for r0.10 release.
2 parents 0b1ee59 + 4feacb6 commit 0b70bd8

File tree

10 files changed

+134
-26
lines changed

10 files changed

+134
-26
lines changed

tensorflow/g3doc/api_docs/cc/ClassEnv.md

Lines changed: 48 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Returns the file system schemes registered for this Env .
3838

3939

4040

41-
#### `Status tensorflow::Env::NewRandomAccessFile(const string &fname, RandomAccessFile **result)` {#Status_tensorflow_Env_NewRandomAccessFile}
41+
#### `Status tensorflow::Env::NewRandomAccessFile(const string &fname, std::unique_ptr< RandomAccessFile > *result)` {#Status_tensorflow_Env_NewRandomAccessFile}
4242

4343
Creates a brand new random access read-only file with the specified name.
4444

@@ -48,7 +48,7 @@ The returned file may be concurrently accessed by multiple threads.
4848

4949
The ownership of the returned RandomAccessFile is passed to the caller and the object should be deleted when is not used. The file object shouldn&apos;t live longer than the Env object.
5050

51-
#### `Status tensorflow::Env::NewWritableFile(const string &fname, WritableFile **result)` {#Status_tensorflow_Env_NewWritableFile}
51+
#### `Status tensorflow::Env::NewWritableFile(const string &fname, std::unique_ptr< WritableFile > *result)` {#Status_tensorflow_Env_NewWritableFile}
5252

5353
Creates an object that writes to a new file with the specified name.
5454

@@ -58,7 +58,7 @@ The returned file will only be accessed by one thread at a time.
5858

5959
The ownership of the returned WritableFile is passed to the caller and the object should be deleted when is not used. The file object shouldn&apos;t live longer than the Env object.
6060

61-
#### `Status tensorflow::Env::NewAppendableFile(const string &fname, WritableFile **result)` {#Status_tensorflow_Env_NewAppendableFile}
61+
#### `Status tensorflow::Env::NewAppendableFile(const string &fname, std::unique_ptr< WritableFile > *result)` {#Status_tensorflow_Env_NewAppendableFile}
6262

6363
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).
6464

@@ -68,7 +68,7 @@ The returned file will only be accessed by one thread at a time.
6868

6969
The ownership of the returned WritableFile is passed to the caller and the object should be deleted when is not used. The file object shouldn&apos;t live longer than the Env object.
7070

71-
#### `Status tensorflow::Env::NewReadOnlyMemoryRegionFromFile(const string &fname, ReadOnlyMemoryRegion **result)` {#Status_tensorflow_Env_NewReadOnlyMemoryRegionFromFile}
71+
#### `Status tensorflow::Env::NewReadOnlyMemoryRegionFromFile(const string &fname, std::unique_ptr< ReadOnlyMemoryRegion > *result)` {#Status_tensorflow_Env_NewReadOnlyMemoryRegionFromFile}
7272

7373
Creates a readonly region of memory with the file context.
7474

@@ -96,6 +96,20 @@ Deletes the named file.
9696

9797

9898

99+
#### `Status tensorflow::Env::DeleteRecursively(const string &dirname, int64 *undeleted_files, int64 *undeleted_dirs)` {#Status_tensorflow_Env_DeleteRecursively}
100+
101+
Deletes the specified directory and all subdirectories and files underneath it. undeleted_files and undeleted_dirs stores the number of files and directories that weren&apos;t deleted (unspecified if the return status is not OK). REQUIRES: undeleted_files, undeleted_dirs to be not null. Typical return codes.
102+
103+
104+
105+
OK - dirname exists and we were able to delete everything underneath.
106+
107+
NOT_FOUND - dirname doesn&apos;t exist
108+
109+
PERMISSION_DENIED - dirname or some descendant is not writable
110+
111+
UNIMPLEMENTED - Some underlying functions (like Delete) are not implemented
112+
99113
#### `Status tensorflow::Env::CreateDir(const string &dirname)` {#Status_tensorflow_Env_CreateDir}
100114

101115
Creates the specified directory.
@@ -108,6 +122,28 @@ Deletes the specified directory.
108122

109123

110124

125+
#### `Status tensorflow::Env::Stat(const string &fname, FileStatistics *stat)` {#Status_tensorflow_Env_Stat}
126+
127+
Obtains statistics for the given path.
128+
129+
130+
131+
#### `Status tensorflow::Env::IsDirectory(const string &fname)` {#Status_tensorflow_Env_IsDirectory}
132+
133+
Returns whether the given path is a directory or not. Typical return codes (not guaranteed exhaustive):
134+
135+
136+
137+
OK - The path exists and is a directory.
138+
139+
FAILED_PRECONDITION - The path exists and is not a directory.
140+
141+
NOT_FOUND - The path entry does not exist.
142+
143+
PERMISSION_DENIED - Insufficient permissions.
144+
145+
UNIMPLEMENTED - The file factory doesn&apos;t support directories.
146+
111147
#### `Status tensorflow::Env::GetFileSize(const string &fname, uint64 *file_size)` {#Status_tensorflow_Env_GetFileSize}
112148

113149
Stores the size of `fname` in `*file_size`.
@@ -126,7 +162,13 @@ Returns the number of micro-seconds since some fixed point in time. Only useful
126162

127163

128164

129-
#### `virtual void tensorflow::Env::SleepForMicroseconds(int micros)=0` {#virtual_void_tensorflow_Env_SleepForMicroseconds}
165+
#### `virtual uint64 tensorflow::Env::NowSeconds()` {#virtual_uint64_tensorflow_Env_NowSeconds}
166+
167+
Returns the number of seconds since some fixed point in time. Only useful for computing deltas of time.
168+
169+
170+
171+
#### `virtual void tensorflow::Env::SleepForMicroseconds(int64 micros)=0` {#virtual_void_tensorflow_Env_SleepForMicroseconds}
130172

131173
Sleeps/delays the thread for the prescribed number of micro-seconds.
132174

@@ -144,7 +186,7 @@ Caller takes ownership of the result and must delete it eventually (the deletion
144186

145187

146188

147-
#### `virtual void tensorflow::Env::SchedClosureAfter(int micros, std::function< void()> closure)=0` {#virtual_void_tensorflow_Env_SchedClosureAfter}
189+
#### `virtual void tensorflow::Env::SchedClosureAfter(int64 micros, std::function< void()> closure)=0` {#virtual_void_tensorflow_Env_SchedClosureAfter}
148190

149191

150192

tensorflow/g3doc/api_docs/cc/ClassEnvWrapper.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Returns the number of micro-seconds since some fixed point in time. Only useful
4848

4949

5050

51-
#### `void tensorflow::EnvWrapper::SleepForMicroseconds(int micros) override` {#void_tensorflow_EnvWrapper_SleepForMicroseconds}
51+
#### `void tensorflow::EnvWrapper::SleepForMicroseconds(int64 micros) override` {#void_tensorflow_EnvWrapper_SleepForMicroseconds}
5252

5353
Sleeps/delays the thread for the prescribed number of micro-seconds.
5454

@@ -66,7 +66,7 @@ Caller takes ownership of the result and must delete it eventually (the deletion
6666

6767

6868

69-
#### `void tensorflow::EnvWrapper::SchedClosureAfter(int micros, std::function< void()> closure) override` {#void_tensorflow_EnvWrapper_SchedClosureAfter}
69+
#### `void tensorflow::EnvWrapper::SchedClosureAfter(int64 micros, std::function< void()> closure) override` {#void_tensorflow_EnvWrapper_SchedClosureAfter}
7070

7171

7272

tensorflow/g3doc/api_docs/cc/ClassTensor.md

Lines changed: 47 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ Represents an n-dimensional array of values.
88

99
#### `tensorflow::Tensor::Tensor()` {#tensorflow_Tensor_Tensor}
1010

11-
Default Tensor constructor. Creates a 1-dimension, 0-element float tensor.
11+
Creates a 1-dimensional, 0-element float tensor.
1212

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:
1314

15+
```c++ Tensor(DT_FLOAT, TensorShape({}))
16+
17+
```
1418

1519
#### `tensorflow::Tensor::Tensor(DataType type, const TensorShape &shape)` {#tensorflow_Tensor_Tensor}
1620

@@ -32,22 +36,28 @@ Creates a tensor with the input `type` and `shape`, using the allocator `a` and
3236

3337
#### `tensorflow::Tensor::Tensor(DataType type)` {#tensorflow_Tensor_Tensor}
3438

35-
Creates an uninitialized Tensor of the given data type.
36-
39+
Creates an empty Tensor of the given data type.
3740

41+
Like Tensor() , returns a 1-dimensional, 0-element Tensor with IsInitialized() returning True. See the Tensor() documentation for details.
3842

3943
#### `tensorflow::Tensor::Tensor(const Tensor &other)` {#tensorflow_Tensor_Tensor}
4044

4145

4246

4347

4448

45-
#### `tensorflow::Tensor::~Tensor()` {#tensorflow_Tensor_Tensor}
49+
#### `tensorflow::Tensor::Tensor(Tensor &&other)` {#tensorflow_Tensor_Tensor}
4650

4751
Copy constructor.
4852

4953

5054

55+
#### `tensorflow::Tensor::~Tensor()` {#tensorflow_Tensor_Tensor}
56+
57+
58+
59+
60+
5161
#### `DataType tensorflow::Tensor::dtype() const` {#DataType_tensorflow_Tensor_dtype}
5262

5363
Returns the data type.
@@ -98,9 +108,9 @@ Convenience accessor for the tensor shape.
98108

99109
#### `bool tensorflow::Tensor::IsInitialized() const` {#bool_tensorflow_Tensor_IsInitialized}
100110

101-
Has this Tensor been initialized?
102-
111+
If necessary, has this Tensor been initialized?
103112

113+
Zero-element Tensors are always considered initialized, even if they have never been assigned to and do not have any memory allocated.
104114

105115
#### `size_t tensorflow::Tensor::TotalBytes() const` {#size_t_tensorflow_Tensor_TotalBytes}
106116

@@ -120,6 +130,12 @@ Assign operator. This tensor shares other&apos;s underlying storage.
120130

121131

122132

133+
#### `Tensor & tensorflow::Tensor::operator=(Tensor &&other)` {#Tensor_tensorflow_Tensor_operator_}
134+
135+
Move operator. See move constructor for details.
136+
137+
138+
123139
#### `bool tensorflow::Tensor::CopyFrom(const Tensor &other, const TensorShape &shape) TF_MUST_USE_RESULT` {#bool_tensorflow_Tensor_CopyFrom}
124140

125141
Copy the other tensor into this tensor and reshape it.
@@ -190,6 +206,12 @@ auto mat = my_mat.matrix<int32>();// CHECK fails as type mismatch.
190206
191207
192208
209+
#### `TTypes< T, NDIMS >::Tensor tensorflow::Tensor::bit_casted_tensor()` {#TTypes_T_NDIMS_Tensor_tensorflow_Tensor_bit_casted_tensor}
210+
211+
Return the tensor data to an `Eigen::Tensor` with the same size but a bitwise cast to the specified dtype `T`.
212+
213+
Using a bitcast is useful for move and copy operations. NOTE: this is the same as `tensor()` except a bitcast is allowed.
214+
193215
#### `TTypes<T>::Flat tensorflow::Tensor::flat()` {#TTypes_T_Flat_tensorflow_Tensor_flat}
194216
195217
Return the tensor data as an `Eigen::Tensor` of the data type and a specified shape.
@@ -239,6 +261,12 @@ Returns the data as an Eigen::Tensor with NDIMS dimensions, collapsing all Tenso
239261

240262

241263

264+
#### `TTypes< T, NDIMS >::Tensor tensorflow::Tensor::bit_casted_shaped(gtl::ArraySlice< int64 > new_sizes)` {#TTypes_T_NDIMS_Tensor_tensorflow_Tensor_bit_casted_shaped}
265+
266+
Return the tensor data to an `Eigen::Tensor` with the new shape specified in `new_sizes` and cast to a new dtype `T`.
267+
268+
Using a bitcast is useful for move and copy operations. The allowed bitcast is the only difference from `shaped()`.
269+
242270
#### `TTypes< T, NDIMS >::UnalignedTensor tensorflow::Tensor::unaligned_shaped(gtl::ArraySlice< int64 > new_sizes)` {#TTypes_T_NDIMS_UnalignedTensor_tensorflow_Tensor_unaligned_shaped}
243271

244272

@@ -269,6 +297,12 @@ Const versions of all the methods above.
269297

270298

271299

300+
#### `TTypes< T, NDIMS >::ConstTensor tensorflow::Tensor::bit_casted_tensor() const` {#TTypes_T_NDIMS_ConstTensor_tensorflow_Tensor_bit_casted_tensor}
301+
302+
Return the tensor data to an `Eigen::Tensor` with the same size but a bitwise cast to the specified dtype `T`.
303+
304+
Using a bitcast is useful for move and copy operations. NOTE: this is the same as `tensor()` except a bitcast is allowed.
305+
272306
#### `TTypes<T>::ConstFlat tensorflow::Tensor::flat() const` {#TTypes_T_ConstFlat_tensorflow_Tensor_flat}
273307

274308

@@ -287,6 +321,12 @@ Const versions of all the methods above.
287321

288322

289323

324+
#### `TTypes< T, NDIMS >::ConstTensor tensorflow::Tensor::bit_casted_shaped(gtl::ArraySlice< int64 > new_sizes) const` {#TTypes_T_NDIMS_ConstTensor_tensorflow_Tensor_bit_casted_shaped}
325+
326+
Return the tensor data to an `Eigen::Tensor` with the new shape specified in `new_sizes` and cast to a new dtype `T`.
327+
328+
Using a bitcast is useful for move and copy operations. The allowed bitcast is the only difference from `shaped()`.
329+
290330
#### `TTypes< T, NDIMS >::UnalignedConstTensor tensorflow::Tensor::unaligned_shaped(gtl::ArraySlice< int64 > new_sizes) const` {#TTypes_T_NDIMS_UnalignedConstTensor_tensorflow_Tensor_unaligned_shaped}
291331

292332

@@ -337,7 +377,7 @@ The returned ` StringPiece ` may point to memory location on devices that the CP
337377

338378
NOTE: The underlying tensor buffer is refcounted, so the lifetime of the contents mapped by the ` StringPiece ` matches the lifetime of the buffer; callers should arrange to make sure the buffer does not get destroyed while the ` StringPiece ` is still used.
339379

340-
REQUIRES: `DataTypeCanUseMemcpy( dtype() )`.
380+
REQUIRES: `DataTypeCanUseMemcpy(dtype())`.
341381

342382
#### `void tensorflow::Tensor::UnsafeCopyFromInternal(const Tensor &, const TensorShape &)` {#void_tensorflow_Tensor_UnsafeCopyFromInternal}
343383

tensorflow/g3doc/api_docs/cc/ClassTensorShape.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,18 @@ Copy the specified shape.
6060

6161

6262

63+
#### `tensorflow::TensorShape::TensorShape(TensorShape &&b)` {#tensorflow_TensorShape_TensorShape}
64+
65+
Move the specified shape. After moving, is safe for destruction and.
66+
67+
68+
69+
#### `void tensorflow::TensorShape::operator=(TensorShape &&b)` {#void_tensorflow_TensorShape_operator_}
70+
71+
72+
73+
74+
6375
#### `void tensorflow::TensorShape::Clear()` {#void_tensorflow_TensorShape_Clear}
6476

6577
Clear a tensor shape.

tensorflow/g3doc/api_docs/cc/ClassTensorShapeUtils.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,25 @@ Static helper routines for ` TensorShape `. Includes a few common predicates on
3636

3737

3838

39-
#### `static Status tensorflow::TensorShapeUtils::MakeShape(const int32 *dims, int n, TensorShape *out)` {#static_Status_tensorflow_TensorShapeUtils_MakeShape}
39+
#### `static Status tensorflow::TensorShapeUtils::MakeShape(const int32 *dims, int64 n, TensorShape *out)` {#static_Status_tensorflow_TensorShapeUtils_MakeShape}
4040

4141
Returns a ` TensorShape ` whose dimensions are `dims[0]`, `dims[1]`, ..., `dims[n-1]`.
4242

4343

4444

45-
#### `static Status tensorflow::TensorShapeUtils::MakeShape(const int64 *dims, int n, TensorShape *out)` {#static_Status_tensorflow_TensorShapeUtils_MakeShape}
45+
#### `static Status tensorflow::TensorShapeUtils::MakeShape(const int64 *dims, int64 n, TensorShape *out)` {#static_Status_tensorflow_TensorShapeUtils_MakeShape}
46+
47+
48+
49+
50+
51+
#### `static Status tensorflow::TensorShapeUtils::MakeShape(gtl::ArraySlice< int32 > shape, TensorShape *out)` {#static_Status_tensorflow_TensorShapeUtils_MakeShape}
52+
53+
54+
55+
56+
57+
#### `static Status tensorflow::TensorShapeUtils::MakeShape(gtl::ArraySlice< int64 > shape, TensorShape *out)` {#static_Status_tensorflow_TensorShapeUtils_MakeShape}
4658

4759

4860

tensorflow/g3doc/api_docs/cc/StructTF_Buffer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919

2020

21-
#### `void(* TF_Buffer::data_deallocator) (void *data, size_t length))(void *data, size_t length)` {#void_TF_Buffer_data_deallocator_void_data_size_t_length_}
21+
#### `void(* TF_Buffer::data_deallocator)(void *data, size_t length))(void *data, size_t length)` {#void_TF_Buffer_data_deallocator_void_data_size_t_length_}
2222

2323

2424

tensorflow/g3doc/api_docs/python/client.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,8 @@ the session constructor.
350350

351351

352352
* <b>`target`</b>: (Optional.) The execution engine to connect to.
353-
Defaults to using an in-process engine.
353+
Defaults to using an in-process engine. At present, no value
354+
other than the empty string is supported.
354355
* <b>`graph`</b>: (Optional.) The `Graph` to be launched (described above).
355356
* <b>`config`</b>: (Optional) `ConfigProto` proto used to configure the session.
356357

tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.nn.rnn.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
Creates a recurrent neural network specified by RNNCell `cell`.
44

5-
##### The simplest form of RNN network generated is:
6-
5+
The simplest form of RNN network generated is:
6+
```py
77
state = cell.zero_state(...)
88
outputs = []
99
for input_ in inputs:
1010
output, state = cell(input_, state)
1111
outputs.append(output)
1212
return (outputs, state)
13-
13+
```
1414
However, a few other options are available:
1515

1616
An initial state can be provided.

tensorflow/g3doc/api_docs/python/functions_and_classes/shard2/tf.InteractiveSession.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ the session constructor.
5353

5454

5555
* <b>`target`</b>: (Optional.) The execution engine to connect to.
56-
Defaults to using an in-process engine.
56+
Defaults to using an in-process engine. At present, no value
57+
other than the empty string is supported.
5758
* <b>`graph`</b>: (Optional.) The `Graph` to be launched (described above).
5859
* <b>`config`</b>: (Optional) `ConfigProto` proto used to configure the session.
5960

tensorflow/g3doc/api_docs/python/nn.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1582,15 +1582,15 @@ automatically performed.
15821582

15831583
Creates a recurrent neural network specified by RNNCell `cell`.
15841584

1585-
##### The simplest form of RNN network generated is:
1586-
1585+
The simplest form of RNN network generated is:
1586+
```py
15871587
state = cell.zero_state(...)
15881588
outputs = []
15891589
for input_ in inputs:
15901590
output, state = cell(input_, state)
15911591
outputs.append(output)
15921592
return (outputs, state)
1593-
1593+
```
15941594
However, a few other options are available:
15951595

15961596
An initial state can be provided.

0 commit comments

Comments
 (0)