Skip to content

Commit a34174b

Browse files
authored
Fix Javadoc errors (#152)
1 parent 0a1a868 commit a34174b

File tree

5 files changed

+27
-15
lines changed

5 files changed

+27
-15
lines changed

pom.xml

+12
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,18 @@
119119
</dependencyManagement>
120120

121121
<profiles>
122+
<!--
123+
Developer profile
124+
Enable javadoc generation so the developer is aware of any mistake that might prevent
125+
ultimately the deployment of the artifacts
126+
-->
127+
<profile>
128+
<id>dev</id>
129+
<properties>
130+
<maven.javadoc.skip>false</maven.javadoc.skip>
131+
</properties>
132+
</profile>
133+
122134
<!--
123135
Deploying profile
124136
Build the Javadoc when deploying

tensorflow-framework/src/main/java/org/tensorflow/framework/losses/CategoricalCrossentropy.java

+8-8
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ public CategoricalCrossentropy(Ops tf, String name, boolean fromLogits) {
155155
* @param tf the TensorFlow Ops
156156
* @param fromLogits Whether to interpret predictions as a tensor of logit values
157157
* @param labelSmoothing Float in <code>[0, 1]</code>. When <code>&gt; 0</code>, label values are smoothed, meaning the
158-
* confidence on label values are relaxed. e.g. <code>labelSmoothing=0.2<code> means that we will use a
159-
* value of </code>0.1<code> for label </code>0<code> and </code>0.9<code> for label </code>1<code>
158+
* confidence on label values are relaxed. e.g. <code>labelSmoothing=0.2</code> means that we will use a
159+
* value of <code>0.1</code> for label <code>0</code> and <code>0.9</code> for label <code>1</code>
160160
*/
161161
public CategoricalCrossentropy(Ops tf, boolean fromLogits, float labelSmoothing) {
162162
this(tf, null, fromLogits, labelSmoothing, REDUCTION_DEFAULT, DEFAULT_AXIS);
@@ -170,8 +170,8 @@ public CategoricalCrossentropy(Ops tf, boolean fromLogits, float labelSmoothing)
170170
* @param name the name of this loss
171171
* @param fromLogits Whether to interpret predictions as a tensor of logit values
172172
* @param labelSmoothing Float in <code>[0, 1]</code>. When <code>&gt; 0</code>, label values are smoothed, meaning the
173-
* confidence on label values are relaxed. e.g. <code>labelSmoothing=0.2<code> means that we will use a
174-
* value of </code>0.1<code> for label </code>0<code> and </code>0.9<code> for label </code>1<code>
173+
* confidence on label values are relaxed. e.g. <code>labelSmoothing=0.2</code> means that we will use a
174+
* value of <code>0.1</code> for label <code>0</code> and <code>0.9</code> for label <code>1</code>
175175
*/
176176
public CategoricalCrossentropy(Ops tf, String name, boolean fromLogits, float labelSmoothing) {
177177
this(tf, name, fromLogits, labelSmoothing, REDUCTION_DEFAULT, DEFAULT_AXIS);
@@ -184,8 +184,8 @@ public CategoricalCrossentropy(Ops tf, String name, boolean fromLogits, float la
184184
* @param tf the TensorFlow Ops
185185
* @param fromLogits Whether to interpret predictions as a tensor of logit values
186186
* @param labelSmoothing Float in <code>[0, 1]</code>. When <code>&gt; 0</code>, label values are smoothed, meaning the
187-
* confidence on label values are relaxed. e.g. <code>x=0.2<code> means that we will use a
188-
* value of </code>0.1<code> for label </code>0<code> and </code>0.9<code> for label </code>1<code>
187+
* confidence on label values are relaxed. e.g. <code>x=0.2</code> means that we will use a
188+
* value of <code>0.1</code> for label <code>0</code> and <code>0.9</code> for label <code>1</code>
189189
* @param reduction Type of Reduction to apply to loss.
190190
*/
191191
public CategoricalCrossentropy(
@@ -200,8 +200,8 @@ public CategoricalCrossentropy(
200200
* @param name the name of this loss
201201
* @param fromLogits Whether to interpret predictions as a tensor of logit values
202202
* @param labelSmoothing Float in <code>[0, 1]</code>. When <code>&gt; 0</code>, label values are smoothed, meaning the
203-
* confidence on label values are relaxed. e.g. <code>labelSmoothing=0.2<code> means that we will use a
204-
* value of </code>0.1<code> for label </code>0<code> and </code>0.9<code> for label </code>1<code>
203+
* confidence on label values are relaxed. e.g. <code>labelSmoothing=0.2</code> means that we will use a
204+
* value of <code>0.1</code> for label <code>0</code> and <code>0.9</code> for label <code>1</code>
205205
* @param reduction Type of Reduction to apply to loss.
206206
* @param axis The channels axis. <code>axis=-1</code> corresponds to data format `Channels Last'
207207
* and <code>axis=1</code> corresponds to data format 'Channels First'.

tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Hinge.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*
2626
* <p><code>loss = maximum(1 - labels * predictions, 0)</code></p>.
2727
*
28-
* <p><code>labels/code> values are expected to be -1 or 1.
28+
* <p><code>labels</code> values are expected to be -1 or 1.
2929
* If binary (0 or 1) labels are provided, they will be converted to -1 or 1.</p>
3030
*
3131
* <p>Standalone usage:

tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ private static <T extends TNumber> Operand<T> binaryCrossentropyHelper(
218218
* @param predictions the predictions
219219
* @param fromLogits Whether to interpret predictions as a tensor of logit values
220220
* @param labelSmoothing Float in <code>[0, 1]</code>. When <code>&gt; 0</code>, label values are smoothed, meaning the
221-
* confidence on label values are relaxed. e.g. <code>labelSmoothing=0.2<code> means that we will use a
222-
* value of </code>0.1<code> for label </code>0<code> and </code>0.9<code> for label </code>1<code>
221+
* confidence on label values are relaxed. e.g. <code>labelSmoothing=0.2</code> means that we will use a
222+
* value of <code>0.1</code> for label <code>0</code> and <code>0.9</code> for label <code>1</code>
223223
* @param axis the
224224
* @param <T> the data type of the predictions and labels
225225
* @return the categorical crossentropy loss.

tensorflow-framework/src/main/java/org/tensorflow/framework/losses/impl/LossesHelper.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ public class LossesHelper {
4343
*
4444
* <ol type="1">
4545
* <li>Squeezes last dim of <code>predictions</code> or <code>labels</code> if their rank
46-
* differs by 1 (using {@link #removeSqueezableDimensions}).
46+
* differs by 1 (using {@link #removeSqueezableDimensions}).</li>
4747
* <li>Squeezes or expands last dim of <code>sampleWeight</code> if its rank differs by 1 from
4848
* the new rank of <code>predictions</code>. If <code>sampleWeight</code> is scalar, it is
49-
* kept scalar./li>
49+
* kept scalar.</li>
5050
* </ol>
5151
*
5252
* @param tf the TensorFlow Ops
@@ -80,7 +80,7 @@ public static <T extends TNumber> LossTuple<T> squeezeOrExpandDimensions(
8080
* </code>.
8181
* @param sampleWeights Optional sample weight(s) <code>Operand</code> whose dimensions match<code>
8282
* prediction</code>.
83-
* @return LossTuple of <code>prediction<s/code>, <code>labels</code> and <code>sampleWeight</code>.
83+
* @return LossTuple of <code>predictions</code>, <code>labels</code> and <code>sampleWeight</code>.
8484
* Each of them possibly has the last dimension squeezed, <code>sampleWeight</code> could be
8585
* extended by one dimension. If <code>sampleWeight</code> is null, only the possibly shape modified <code>predictions</code> and <code>labels</code> are
8686
* returned.
@@ -290,7 +290,7 @@ private static <T extends TNumber> Operand<T> reduceWeightedLoss(
290290
* Computes a safe mean of the losses.
291291
*
292292
* @param tf the TensorFlow Ops
293-
* @param losses </code>Operand</code> whose elements contain individual loss measurements.
293+
* @param losses <code>Operand</code> whose elements contain individual loss measurements.
294294
* @param numElements The number of measurable elements in <code>losses</code>.
295295
* @param <T> the data type of the losses
296296
* @return A scalar representing the mean of <code>losses</code>. If <code>numElements</code> is

0 commit comments

Comments
 (0)