Skip to content

Commit a4eb388

Browse files
committed
Update javadoc generation
Signed-off-by: Ryan Nett <[email protected]>
1 parent 20584f2 commit a4eb388

File tree

25 files changed

+9474
-8061
lines changed

25 files changed

+9474
-8061
lines changed

tensorflow-kotlin-parent/tensorflow-core-kotlin/pom.xml

-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@
121121
<configuration>
122122
<sourceDirs>
123123
<sourceDir>${project.basedir}/src/main/kotlin</sourceDir>
124-
<sourceDir>${project.basedir}/src/gen/annotations</sourceDir>
125124
<sourceDir>${project.basedir}/../../tensorflow-core/tensorflow-core-api/src/gen/java</sourceDir>
126125
<sourceDir>${project.basedir}/../../tensorflow-core/tensorflow-core-api/src/gen/annotations</sourceDir>
127126
<sourceDir>${project.basedir}/../../tensorflow-core/tensorflow-core-api/src/main/java</sourceDir>

tensorflow-kotlin-parent/tensorflow-core-kotlin/src/gen/annotations/org/tensorflow/op/kotlin/AudioOps.kt

+19-11
Original file line numberDiff line numberDiff line change
@@ -51,21 +51,25 @@ public class AudioOps(
5151
* slices of frequency information, one slice for each window of time. By joining
5252
* these together into a sequence, they form a distinctive fingerprint of the sound
5353
* over time.
54-
* This op expects to receive audio data as an input, stored as floats in the range
54+
*
55+
* This op expects to receive audio data as an input, stored as floats in the range
5556
* -1 to 1, together with a window width in samples, and a stride specifying how
5657
* far to move the window between slices. From this it generates a three
5758
* dimensional output. The first dimension is for the channels in the input, so a
5859
* stereo audio input would have two here for example. The second dimension is time,
5960
* with successive frequency slices. The third dimension has an amplitude value for
6061
* each frequency during that time slice.
61-
* This means the layout when converted and saved as an image is rotated 90 degrees
62+
*
63+
* This means the layout when converted and saved as an image is rotated 90 degrees
6264
* clockwise from a typical spectrogram. Time is descending down the Y axis, and
6365
* the frequency decreases from left to right.
64-
* Each value in the result represents the square root of the sum of the real and
66+
*
67+
* Each value in the result represents the square root of the sum of the real and
6568
* imaginary parts of an FFT on the current window of samples. In this way, the
6669
* lowest dimension represents the power of each frequency in the current window,
6770
* and adjacent windows are concatenated in the next dimension.
68-
* To get a more intuitive and visual look at what this operation does, you can run
71+
*
72+
* To get a more intuitive and visual look at what this operation does, you can run
6973
* tensorflow/examples/wav_to_spectrogram to read in an audio file and save out the
7074
* resulting spectrogram as a PNG image.
7175
*
@@ -99,16 +103,19 @@ public class AudioOps(
99103
/**
100104
* Decode a 16-bit PCM WAV file to a float tensor.
101105
* The -32768 to 32767 signed 16-bit values will be scaled to -1.0 to 1.0 in float.
102-
* When desired_channels is set, if the input contains fewer channels than this
106+
*
107+
* When desired_channels is set, if the input contains fewer channels than this
103108
* then the last channel will be duplicated to give the requested number, else if
104109
* the input has more channels than requested then the additional channels will be
105110
* ignored.
106-
* If desired_samples is set, then the audio will be cropped or padded with zeroes
111+
*
112+
* If desired_samples is set, then the audio will be cropped or padded with zeroes
107113
* to the requested length.
108-
* The first output contains a Tensor with the content of the audio samples. The
114+
*
115+
* The first output contains a Tensor with the content of the audio samples. The
109116
* lowest dimension will be the number of channels, and the second will be the
110117
* number of samples. For example, a ten-sample-long stereo WAV file should give an
111-
* output shape of &#91;10, 2].
118+
* output shape of &#91;10, 2&#93;.
112119
*
113120
* @param contents The WAV-encoded audio, usually from a file.
114121
* @param options carries optional attribute values
@@ -141,10 +148,11 @@ public class AudioOps(
141148
* audio file. It will be encoded in the 16-bit PCM format. It takes in float
142149
* values in the range -1.0f to 1.0f, and any outside that value will be clamped to
143150
* that range.
144-
* ``` audio``` is a 2-D float Tensor of shape ``` [length, channels]```.
145-
* ``` sample_rate``` is a scalar Tensor holding the rate to use (e.g. 44100).
146151
*
147-
* @param audio 2-D with shape ` [length, channels]`.
152+
* `audio` is a 2-D float Tensor of shape `&#91;length, channels&#93;`.
153+
* `sample_rate` is a scalar Tensor holding the rate to use (e.g. 44100).
154+
*
155+
* @param audio 2-D with shape `&#91;length, channels&#93;`.
148156
* @param sampleRate Scalar containing the sample frequency.
149157
* @return a new instance of EncodeWav
150158
* @see org.tensorflow.op.AudioOps.encodeWav

tensorflow-kotlin-parent/tensorflow-core-kotlin/src/gen/annotations/org/tensorflow/op/kotlin/BitwiseOps.kt

+93-82
Original file line numberDiff line numberDiff line change
@@ -46,29 +46,31 @@ public class BitwiseOps(
4646
public val scope: Scope = ops.scope
4747

4848
/**
49-
* Elementwise computes the bitwise AND of ``` x``` and ``` y```.
50-
* The result will have those bits set, that are set in both ``` x``` and ``` y```. The
51-
* computation is performed on the underlying representations of ``` x``` and ``` y```.
52-
* For example:
49+
* Elementwise computes the bitwise AND of `x` and `y`.
50+
* The result will have those bits set, that are set in both `x` and `y`. The
51+
* computation is performed on the underlying representations of `x` and `y`.
5352
*
54-
* import tensorflow as tf
53+
* For example:
54+
* ```
55+
* import tensorflow as tf
5556
* from tensorflow.python.ops import bitwise_ops
56-
* dtype_list = &#91;tf.int8, tf.int16, tf.int32, tf.int64,
57+
* dtype_list = [tf.int8, tf.int16, tf.int32, tf.int64,
5758
* tf.uint8, tf.uint16, tf.uint32, tf.uint64]
5859
*
5960
* for dtype in dtype_list:
60-
* lhs = tf.constant(&#91;0, 5, 3, 14], dtype=dtype)
61-
* rhs = tf.constant(&#91;5, 0, 7, 11], dtype=dtype)
62-
* exp = tf.constant(&#91;0, 0, 3, 10], dtype=tf.float32)
61+
* lhs = tf.constant([0, 5, 3, 14], dtype=dtype)
62+
* rhs = tf.constant([5, 0, 7, 11], dtype=dtype)
63+
* exp = tf.constant([0, 0, 3, 10], dtype=tf.float32)
6364
*
6465
* res = bitwise_ops.bitwise_and(lhs, rhs)
6566
* tf.assert_equal(tf.cast(res, tf.float32), exp) # TRUE
6667
*
68+
* ```
6769
*
68-
* @param T data type for ` z` output
70+
* @param <T> data type for `z` output
6971
* @param x the x value
7072
* @param y the y value
71-
* @param T data type for ` BitwiseAnd` output and operands
73+
* @param <T> data type for `BitwiseAnd` output and operands
7274
* @return a new instance of BitwiseAnd
7375
* @see org.tensorflow.op.BitwiseOps.bitwiseAnd
7476
*/
@@ -79,29 +81,31 @@ public class BitwiseOps(
7981
)
8082

8183
/**
82-
* Elementwise computes the bitwise OR of ``` x``` and ``` y```.
83-
* The result will have those bits set, that are set in ``` x```, ``` y``` or both. The
84-
* computation is performed on the underlying representations of ``` x``` and ``` y```.
85-
* For example:
84+
* Elementwise computes the bitwise OR of `x` and `y`.
85+
* The result will have those bits set, that are set in `x`, `y` or both. The
86+
* computation is performed on the underlying representations of `x` and `y`.
8687
*
87-
* import tensorflow as tf
88+
* For example:
89+
* ```
90+
* import tensorflow as tf
8891
* from tensorflow.python.ops import bitwise_ops
89-
* dtype_list = &#91;tf.int8, tf.int16, tf.int32, tf.int64,
92+
* dtype_list = [tf.int8, tf.int16, tf.int32, tf.int64,
9093
* tf.uint8, tf.uint16, tf.uint32, tf.uint64]
9194
*
9295
* for dtype in dtype_list:
93-
* lhs = tf.constant(&#91;0, 5, 3, 14], dtype=dtype)
94-
* rhs = tf.constant(&#91;5, 0, 7, 11], dtype=dtype)
95-
* exp = tf.constant(&#91;5, 5, 7, 15], dtype=tf.float32)
96+
* lhs = tf.constant([0, 5, 3, 14], dtype=dtype)
97+
* rhs = tf.constant([5, 0, 7, 11], dtype=dtype)
98+
* exp = tf.constant([5, 5, 7, 15], dtype=tf.float32)
9699
*
97100
* res = bitwise_ops.bitwise_or(lhs, rhs)
98101
* tf.assert_equal(tf.cast(res, tf.float32), exp) # TRUE
99102
*
103+
* ```
100104
*
101-
* @param T data type for ` z` output
105+
* @param <T> data type for `z` output
102106
* @param x the x value
103107
* @param y the y value
104-
* @param T data type for ` BitwiseOr` output and operands
108+
* @param <T> data type for `BitwiseOr` output and operands
105109
* @return a new instance of BitwiseOr
106110
* @see org.tensorflow.op.BitwiseOps.bitwiseOr
107111
*/
@@ -112,29 +116,31 @@ public class BitwiseOps(
112116
)
113117

114118
/**
115-
* Elementwise computes the bitwise XOR of ``` x``` and ``` y```.
116-
* The result will have those bits set, that are different in ``` x``` and ``` y```. The
117-
* computation is performed on the underlying representations of ``` x``` and ``` y```.
118-
* For example:
119+
* Elementwise computes the bitwise XOR of `x` and `y`.
120+
* The result will have those bits set, that are different in `x` and `y`. The
121+
* computation is performed on the underlying representations of `x` and `y`.
119122
*
120-
* import tensorflow as tf
123+
* For example:
124+
* ```
125+
* import tensorflow as tf
121126
* from tensorflow.python.ops import bitwise_ops
122-
* dtype_list = &#91;tf.int8, tf.int16, tf.int32, tf.int64,
127+
* dtype_list = [tf.int8, tf.int16, tf.int32, tf.int64,
123128
* tf.uint8, tf.uint16, tf.uint32, tf.uint64]
124129
*
125130
* for dtype in dtype_list:
126-
* lhs = tf.constant(&#91;0, 5, 3, 14], dtype=dtype)
127-
* rhs = tf.constant(&#91;5, 0, 7, 11], dtype=dtype)
128-
* exp = tf.constant(&#91;5, 5, 4, 5], dtype=tf.float32)
131+
* lhs = tf.constant([0, 5, 3, 14], dtype=dtype)
132+
* rhs = tf.constant([5, 0, 7, 11], dtype=dtype)
133+
* exp = tf.constant([5, 5, 4, 5], dtype=tf.float32)
129134
*
130135
* res = bitwise_ops.bitwise_xor(lhs, rhs)
131136
* tf.assert_equal(tf.cast(res, tf.float32), exp) # TRUE
132137
*
138+
* ```
133139
*
134-
* @param T data type for ` z` output
140+
* @param <T> data type for `z` output
135141
* @param x the x value
136142
* @param y the y value
137-
* @param T data type for ` BitwiseXor` output and operands
143+
* @param <T> data type for `BitwiseXor` output and operands
138144
* @return a new instance of BitwiseXor
139145
* @see org.tensorflow.op.BitwiseOps.bitwiseXor
140146
*/
@@ -145,51 +151,53 @@ public class BitwiseOps(
145151
)
146152

147153
/**
148-
* Invert (flip) each bit of supported types; for example, type ``` uint8``` value 01010101
149-
* becomes 10101010.
150-
* Flip each bit of supported types. For example, type ``` int8``` (decimal 2) binary 00000010
154+
* Invert (flip) each bit of supported types; for example, type `uint8` value 01010101 becomes
155+
* 10101010.
156+
* Flip each bit of supported types. For example, type `int8` (decimal 2) binary 00000010
151157
* becomes (decimal -3) binary 11111101.
152-
* This operation is performed on each element of the tensor argument ``` x```.
153-
* Example:
158+
* This operation is performed on each element of the tensor argument `x`.
154159
*
155-
* import tensorflow as tf
160+
* Example:
161+
* ```
162+
* import tensorflow as tf
156163
* from tensorflow.python.ops import bitwise_ops
157164
*
158165
* # flip 2 (00000010) to -3 (11111101)
159166
* tf.assert_equal(-3, bitwise_ops.invert(2))
160167
*
161-
* dtype_list = &#91;dtypes.int8, dtypes.int16, dtypes.int32, dtypes.int64,
168+
* dtype_list = [dtypes.int8, dtypes.int16, dtypes.int32, dtypes.int64,
162169
* dtypes.uint8, dtypes.uint16, dtypes.uint32, dtypes.uint64]
163170
*
164-
* inputs = &#91;0, 5, 3, 14]
171+
* inputs = [0, 5, 3, 14]
165172
* for dtype in dtype_list:
166173
* # Because of issues with negative numbers, let's test this indirectly.
167174
* # 1. invert(a) and a = 0
168175
* # 2. invert(a) or a = invert(0)
169-
* input_tensor = tf.constant(&#91;0, 5, 3, 14], dtype=dtype)
170-
* not_a_and_a, not_a_or_a, not_0 = &#91;bitwise_ops.bitwise_and(
176+
* input_tensor = tf.constant([0, 5, 3, 14], dtype=dtype)
177+
* not_a_and_a, not_a_or_a, not_0 = [bitwise_ops.bitwise_and(
171178
* input_tensor, bitwise_ops.invert(input_tensor)),
172179
* bitwise_ops.bitwise_or(
173180
* input_tensor, bitwise_ops.invert(input_tensor)),
174181
* bitwise_ops.invert(
175182
* tf.constant(0, dtype=dtype))]
176183
*
177-
* expected = tf.constant(&#91;0, 0, 0, 0], dtype=tf.float32)
184+
* expected = tf.constant([0, 0, 0, 0], dtype=tf.float32)
178185
* tf.assert_equal(tf.cast(not_a_and_a, tf.float32), expected)
179186
*
180-
* expected = tf.cast(&#91;not_0] * 4, tf.float32)
187+
* expected = tf.cast([not_0] * 4, tf.float32)
181188
* tf.assert_equal(tf.cast(not_a_or_a, tf.float32), expected)
182189
*
183190
* # For unsigned dtypes let's also check the result directly.
184191
* if dtype.is_unsigned:
185192
* inverted = bitwise_ops.invert(input_tensor)
186-
* expected = tf.constant(&#91;dtype.max - x for x in inputs], dtype=tf.float32)
193+
* expected = tf.constant([dtype.max - x for x in inputs], dtype=tf.float32)
187194
* tf.assert_equal(tf.cast(inverted, tf.float32), tf.cast(expected, tf.float32))
188195
*
196+
* ```
189197
*
190-
* @param T data type for ` y` output
198+
* @param <T> data type for `y` output
191199
* @param x the x value
192-
* @param T data type for ` Invert` output and operands
200+
* @param <T> data type for `Invert` output and operands
193201
* @return a new instance of Invert
194202
* @see org.tensorflow.op.BitwiseOps.invert
195203
*/
@@ -198,41 +206,42 @@ public class BitwiseOps(
198206
)
199207

200208
/**
201-
* Elementwise computes the bitwise left-shift of ``` x``` and ``` y```.
202-
* If ``` y``` is negative, or greater than or equal to the width of ``` x``` in bits the
209+
* Elementwise computes the bitwise left-shift of `x` and `y`.
210+
* If `y` is negative, or greater than or equal to the width of `x` in bits the
203211
* result is implementation defined.
204-
* Example:
205212
*
206-
* import tensorflow as tf
213+
* Example:
214+
* ```
215+
* import tensorflow as tf
207216
* from tensorflow.python.ops import bitwise_ops
208217
* import numpy as np
209-
* dtype_list = &#91;tf.int8, tf.int16, tf.int32, tf.int64]
218+
* dtype_list = [tf.int8, tf.int16, tf.int32, tf.int64]
210219
*
211220
* for dtype in dtype_list:
212-
* lhs = tf.constant(&#91;-1, -5, -3, -14], dtype=dtype)
213-
* rhs = tf.constant(&#91;5, 0, 7, 11], dtype=dtype)
221+
* lhs = tf.constant([-1, -5, -3, -14], dtype=dtype)
222+
* rhs = tf.constant([5, 0, 7, 11], dtype=dtype)
214223
*
215224
* left_shift_result = bitwise_ops.left_shift(lhs, rhs)
216225
*
217226
* print(left_shift_result)
218227
*
219228
* # This will print:
220-
* # tf.Tensor(&#91; -32 -5 -128 0], shape=(4,), dtype=int8)
221-
* # tf.Tensor(&#91; -32 -5 -384 -28672], shape=(4,), dtype=int16)
222-
* # tf.Tensor(&#91; -32 -5 -384 -28672], shape=(4,), dtype=int32)
223-
* # tf.Tensor(&#91; -32 -5 -384 -28672], shape=(4,), dtype=int64)
229+
* # tf.Tensor([ -32 -5 -128 0], shape=(4,), dtype=int8)
230+
* # tf.Tensor([ -32 -5 -384 -28672], shape=(4,), dtype=int16)
231+
* # tf.Tensor([ -32 -5 -384 -28672], shape=(4,), dtype=int32)
232+
* # tf.Tensor([ -32 -5 -384 -28672], shape=(4,), dtype=int64)
224233
*
225-
* lhs = np.array(&#91;-2, 64, 101, 32], dtype=np.int8)
226-
* rhs = np.array(&#91;-1, -5, -3, -14], dtype=np.int8)
234+
* lhs = np.array([-2, 64, 101, 32], dtype=np.int8)
235+
* rhs = np.array([-1, -5, -3, -14], dtype=np.int8)
227236
* bitwise_ops.left_shift(lhs, rhs)
228-
* # &lt;tf.Tensor: shape=(4,), dtype=int8, numpy=array(&#91; -2, 64, 101, 32],
229-
* dtype=int8)&gt;
237+
* # <tf.Tensor: shape=(4,), dtype=int8, numpy=array([ -2, 64, 101, 32], dtype=int8)>
230238
*
239+
* ```
231240
*
232-
* @param T data type for ` z` output
241+
* @param <T> data type for `z` output
233242
* @param x the x value
234243
* @param y the y value
235-
* @param T data type for ` LeftShift` output and operands
244+
* @param <T> data type for `LeftShift` output and operands
236245
* @return a new instance of LeftShift
237246
* @see org.tensorflow.op.BitwiseOps.leftShift
238247
*/
@@ -243,43 +252,45 @@ public class BitwiseOps(
243252
)
244253

245254
/**
246-
* Elementwise computes the bitwise right-shift of ``` x``` and ``` y```.
255+
* Elementwise computes the bitwise right-shift of `x` and `y`.
247256
* Performs a logical shift for unsigned integer types, and an arithmetic shift
248257
* for signed integer types.
249-
* If ``` y``` is negative, or greater than or equal to than the width of ``` x``` in bits
258+
*
259+
* If `y` is negative, or greater than or equal to than the width of `x` in bits
250260
* the result is implementation defined.
251-
* Example:
252261
*
253-
* import tensorflow as tf
262+
* Example:
263+
* ```
264+
* import tensorflow as tf
254265
* from tensorflow.python.ops import bitwise_ops
255266
* import numpy as np
256-
* dtype_list = &#91;tf.int8, tf.int16, tf.int32, tf.int64]
267+
* dtype_list = [tf.int8, tf.int16, tf.int32, tf.int64]
257268
*
258269
* for dtype in dtype_list:
259-
* lhs = tf.constant(&#91;-1, -5, -3, -14], dtype=dtype)
260-
* rhs = tf.constant(&#91;5, 0, 7, 11], dtype=dtype)
270+
* lhs = tf.constant([-1, -5, -3, -14], dtype=dtype)
271+
* rhs = tf.constant([5, 0, 7, 11], dtype=dtype)
261272
*
262273
* right_shift_result = bitwise_ops.right_shift(lhs, rhs)
263274
*
264275
* print(right_shift_result)
265276
*
266277
* # This will print:
267-
* # tf.Tensor(&#91;-1 -5 -1 -1], shape=(4,), dtype=int8)
268-
* # tf.Tensor(&#91;-1 -5 -1 -1], shape=(4,), dtype=int16)
269-
* # tf.Tensor(&#91;-1 -5 -1 -1], shape=(4,), dtype=int32)
270-
* # tf.Tensor(&#91;-1 -5 -1 -1], shape=(4,), dtype=int64)
278+
* # tf.Tensor([-1 -5 -1 -1], shape=(4,), dtype=int8)
279+
* # tf.Tensor([-1 -5 -1 -1], shape=(4,), dtype=int16)
280+
* # tf.Tensor([-1 -5 -1 -1], shape=(4,), dtype=int32)
281+
* # tf.Tensor([-1 -5 -1 -1], shape=(4,), dtype=int64)
271282
*
272-
* lhs = np.array(&#91;-2, 64, 101, 32], dtype=np.int8)
273-
* rhs = np.array(&#91;-1, -5, -3, -14], dtype=np.int8)
283+
* lhs = np.array([-2, 64, 101, 32], dtype=np.int8)
284+
* rhs = np.array([-1, -5, -3, -14], dtype=np.int8)
274285
* bitwise_ops.right_shift(lhs, rhs)
275-
* # &lt;tf.Tensor: shape=(4,), dtype=int8, numpy=array(&#91; -2, 64, 101, 32],
276-
* dtype=int8)&gt;
286+
* # <tf.Tensor: shape=(4,), dtype=int8, numpy=array([ -2, 64, 101, 32], dtype=int8)>
277287
*
288+
* ```
278289
*
279-
* @param T data type for ` z` output
290+
* @param <T> data type for `z` output
280291
* @param x the x value
281292
* @param y the y value
282-
* @param T data type for ` RightShift` output and operands
293+
* @param <T> data type for `RightShift` output and operands
283294
* @return a new instance of RightShift
284295
* @see org.tensorflow.op.BitwiseOps.rightShift
285296
*/

0 commit comments

Comments
 (0)