diff --git a/docs/tools/requirements.txt b/docs/tools/requirements.txt new file mode 100644 index 00000000000..681ed3bdde8 --- /dev/null +++ b/docs/tools/requirements.txt @@ -0,0 +1,3 @@ +GitPython +requests +tensorflow-docs \ No newline at end of file diff --git a/pom.xml b/pom.xml index 1a1853b15de..0d8086d9d59 100644 --- a/pom.xml +++ b/pom.xml @@ -546,16 +546,37 @@ maven-javadoc-plugin - 3.6.0 + 3.12.0 + + ./docs/overview.md + + Copyright 2015, 2025 The TensorFlow Authors. All Rights Reserved. + + -Xmaxerrs + 65536 + -Xmaxwarns + 65536 + + false + 256m + 2048m + + https://protobuf.dev/reference/java/api-docs + https://bytedeco.org/javacpp/apidocs + + + + javadoc-site + + javadoc + + attach-javadocs jar - - true - diff --git a/tensorflow-core/tensorflow-core-api/pom.xml b/tensorflow-core/tensorflow-core-api/pom.xml index 0b87d9a17c2..59e1703d355 100644 --- a/tensorflow-core/tensorflow-core-api/pom.xml +++ b/tensorflow-core/tensorflow-core-api/pom.xml @@ -220,30 +220,6 @@ - - maven-javadoc-plugin - 3.6.0 - - - attach-javadocs - - jar - - - - -Xmaxerrs - 65536 - -Xmaxwarns - 65536 - - false - 256m - 2048m - - - - - org.codehaus.mojo exec-maven-plugin diff --git a/tensorflow-core/tensorflow-core-api/src/main/java/module-info.java b/tensorflow-core/tensorflow-core-api/src/main/java/module-info.java index f3e4875193d..b12e7042b48 100644 --- a/tensorflow-core/tensorflow-core-api/src/main/java/module-info.java +++ b/tensorflow-core/tensorflow-core-api/src/main/java/module-info.java @@ -14,6 +14,8 @@ limitations under the License. ======================================================================= */ + +/** Core module implementing the TensorFlow Java API and operator definitions. */ module tensorflow { requires transitive org.tensorflow.ndarray; requires transitive tensorflow.nativelib; diff --git a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/buffer/ByteSequenceTensorBuffer.java b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/buffer/ByteSequenceTensorBuffer.java index bd886d776b7..3bf262bec14 100644 --- a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/buffer/ByteSequenceTensorBuffer.java +++ b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/buffer/ByteSequenceTensorBuffer.java @@ -23,13 +23,11 @@ import static org.tensorflow.internal.c_api.global.tensorflow.TF_TString_GetSize; import java.nio.ReadOnlyBufferException; -import java.util.function.Function; import org.bytedeco.javacpp.BytePointer; import org.bytedeco.javacpp.Loader; import org.bytedeco.javacpp.Pointer; import org.bytedeco.javacpp.PointerScope; import org.tensorflow.internal.c_api.TF_TString; -import org.tensorflow.ndarray.NdArray; import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.impl.buffer.AbstractDataBuffer; import org.tensorflow.ndarray.impl.buffer.Validator; @@ -40,10 +38,9 @@ *

The values are stored as an array of {@link TF_TString}, internally wrapped with {@code * tensorflow::tstring}, which is essentially a portable version of {@code std::string}. * - *

The data of the buffer must be initialized only once, by calling {@link #init(NdArray, - * Function)}, and the buffer must have been allocated with enough space (use {@link - * #computeSize(NdArray, Function)} priory to know exactly how many bytes are required to store the - * data). + *

The data of the buffer must be initialized only once, by calling {@link #init}, and the buffer + * must have been allocated with enough space (use {@link #computeSize} priory to know exactly how + * many bytes are required to store the data). * *

After its data has been initialized, the buffer is read-only as it is not possible to change * safely a value without reinitializing the whole data. @@ -66,8 +63,8 @@ public static long computeSize(ByteSequenceProvider byteSequenceProvider) * *

While it is not enforced programmatically, it is mandatory that this method is called only * once after the creation of the buffer. The buffer must have been allocated according to the - * same set of data, calling {@link #computeSize(NdArray, Function)} priory to make sure there is - * enough space to store it. + * same set of data, calling {@link #computeSize} priory to make sure there is enough space to + * store it. * * @param byteSequenceProvider produces sequences of bytes to use as the tensor data */ diff --git a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/types/TUint16Mapper.java b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/types/TUint16Mapper.java index d563302319a..43faa1199ed 100644 --- a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/types/TUint16Mapper.java +++ b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/types/TUint16Mapper.java @@ -29,7 +29,7 @@ import org.tensorflow.types.TUint16; /** - * Maps memory of {@link org.tensorflow.proto.DataType#DT_Uint16} tensors to a n-dimensional data + * Maps memory of {@link org.tensorflow.proto.DataType#DT_UINT16} tensors to a n-dimensional data * space. */ public final class TUint16Mapper extends TensorMapper { diff --git a/tensorflow-core/tensorflow-core-generator/src/main/java/module-info.java b/tensorflow-core/tensorflow-core-generator/src/main/java/module-info.java index 1b155bc3af1..a6efd2561a3 100644 --- a/tensorflow-core/tensorflow-core-generator/src/main/java/module-info.java +++ b/tensorflow-core/tensorflow-core-generator/src/main/java/module-info.java @@ -14,13 +14,18 @@ limitations under the License. ======================================================================= */ + +/** + * Code to generate the Java side implementations of TensorFlow's ops based on the TensorFlow op + * definition files. + */ module tensorflow.generator { requires tensorflow.nativelib; - requires java.compiler; + requires transitive java.compiler; requires com.github.javaparser.core; requires com.google.protobuf; requires com.google.common; - requires com.squareup.javapoet; + requires transitive com.squareup.javapoet; requires org.commonmark; requires spring.core; diff --git a/tensorflow-core/tensorflow-core-native/pom.xml b/tensorflow-core/tensorflow-core-native/pom.xml index 59d84eb014d..bb9eb053c33 100644 --- a/tensorflow-core/tensorflow-core-native/pom.xml +++ b/tensorflow-core/tensorflow-core-native/pom.xml @@ -639,34 +639,6 @@ - - - maven-javadoc-plugin - 3.7.0 - - - attach-javadocs - - jar - - - - -Xmaxerrs - 65536 - -Xmaxwarns - 65536 - - false - 256m - 2048m - - https://protobuf.dev/reference/java/api-docs - http://bytedeco.org/javacpp/apidocs - - - - - diff --git a/tensorflow-core/tensorflow-core-native/src/main/java/module-info.java b/tensorflow-core/tensorflow-core-native/src/main/java/module-info.java index 2f7628187e3..f9fe6e3ea3d 100644 --- a/tensorflow-core/tensorflow-core-native/src/main/java/module-info.java +++ b/tensorflow-core/tensorflow-core-native/src/main/java/module-info.java @@ -14,6 +14,8 @@ limitations under the License. ======================================================================= */ + +/** Native interop with the TensorFlow C API. */ module tensorflow.nativelib { requires transitive org.bytedeco.javacpp; requires transitive com.google.protobuf; diff --git a/tensorflow-framework/src/main/java/module-info.java b/tensorflow-framework/src/main/java/module-info.java index 2c500bfc459..715d68331cc 100644 --- a/tensorflow-framework/src/main/java/module-info.java +++ b/tensorflow-framework/src/main/java/module-info.java @@ -14,9 +14,11 @@ limitations under the License. ======================================================================= */ + +/** Higher level TensorFlow framework containing model definition and training operations. */ module tensorflow.framework { - requires tensorflow; - requires org.tensorflow.ndarray; + requires transitive tensorflow; + requires transitive org.tensorflow.ndarray; exports org.tensorflow.framework.activations; exports org.tensorflow.framework.constraints; diff --git a/tensorflow-framework/src/main/java/org/tensorflow/framework/losses/impl/LossesHelper.java b/tensorflow-framework/src/main/java/org/tensorflow/framework/losses/impl/LossesHelper.java index 6c40149f3de..ccd801c4fea 100644 --- a/tensorflow-framework/src/main/java/org/tensorflow/framework/losses/impl/LossesHelper.java +++ b/tensorflow-framework/src/main/java/org/tensorflow/framework/losses/impl/LossesHelper.java @@ -299,7 +299,6 @@ private static Operand reduceWeightedLoss( * * @param tf the TensorFlow Ops * @param losses Operand whose elements contain individual loss measurements. - * @param numElements The number of measurable elements in losses. * @param the data type of the losses * @return A scalar representing the mean of losses. If numElements is * zero, then zero is returned.