Skip to content

Commit

Permalink
Javadoc updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
Craigacp authored and karllessard committed Jun 7, 2024
1 parent 0a5084d commit b0b3df0
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 18 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<scm>
<url>https://github.com/tensorflow/java.git</url>
<connection>[email protected]:tensorflow/java.git</connection>
<connection>scm:[email protected]:tensorflow/java.git</connection>
<developerConnection>scm:git:https://github.com/tensorflow/java.git</developerConnection>
</scm>

Expand Down
6 changes: 6 additions & 0 deletions tensorflow-core/tensorflow-core-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,12 @@
<goal>jar</goal>
</goals>
<configuration>
<additionalJOptions>
<additionalJOption>-Xmaxerrs</additionalJOption>
<additionalJOption>65536</additionalJOption>
<additionalJOption>-Xmaxwarns</additionalJOption>
<additionalJOption>65536</additionalJOption>
</additionalJOptions>
<failOnError>false</failOnError>
<minmemory>256m</minmemory>
<maxmemory>2048m</maxmemory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public final class Runner {
*
* @param operation Is either the string name of the operation, in which case this method is a
* shorthand for {@code feed(operation, 0)}, or it is a string of the form
* <tt>operation_name:output_index</tt> , in which case this method acts like {@code
* {@code operation_name:output_index}, in which case this method acts like {@code
* feed(operation_name, output_index)}. These colon-separated names are commonly used in the
* {@code SignatureDef} protocol buffer messages that are included in {@link
* SavedModelBundle#metaGraphDef()}.
Expand Down Expand Up @@ -284,7 +284,7 @@ public Runner feed(Operand<?> operand, Tensor t) {
*
* @param operation Is either the string name of the operation, in which case this method is a
* shorthand for {@code fetch(operation, 0)}, or it is a string of the form
* <tt>operation_name:output_index</tt> , in which case this method acts like {@code
* {@code operation_name:output_index}, in which case this method acts like {@code
* fetch(operation_name, output_index)}. These colon-separated names are commonly used in
* the {@code SignatureDef} protocol buffer messages that are included in {@link
* SavedModelBundle#metaGraphDef()}.
Expand Down Expand Up @@ -403,7 +403,7 @@ public Runner fetch(Operand<?> operand) {
* Tensors}.
*
* @param operation Is either the string name of the operation or it is a string of the form
* <tt>operation_name:output_index</tt>, where <tt>output_index</tt> will simply be ignored.
* {@code operation_name:output_index}, where {@code output_index} will simply be ignored.
* @return this session runner
* @throws IllegalArgumentException if no operation exists with the provided name
*/
Expand Down Expand Up @@ -467,16 +467,7 @@ public boolean isEmpty() {
* Execute the graph fragments necessary to compute all requested fetches.
*
* <p><b>WARNING:</b> The caller assumes ownership of all returned {@link Tensor Tensors}, i.e.,
* the caller must call {@link Tensor#close} on all elements of the returned list to free up
* resources.
*
* <p>TODO(ashankar): Reconsider the return type here. Two things in particular: (a) Make it
* easier for the caller to cleanup (perhaps returning something like AutoCloseableList in
* SessionTest.java), and (b) Evaluate whether the return value should be a list, or maybe a
* {@code Map<Output, Tensor>}?
*
* <p>TODO(andrewmyers): It would also be good if whatever is returned here made it easier to
* extract output tensors in a type-safe way.
* the caller must call {@link Result#close} to free up resources.
*
* @return list of resulting tensors fetched by this session runner
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static <T extends TType> T of(Class<T> type, Shape shape, long size) {
*
* <p>The amount of memory to allocate is derived from the datatype and the shape of the tensor.
* Tensor data is initialized by calling the {@code dataInitializer}, which receives in argument
* the value returned by {@link #data()} on the allocated tensor. For example:
* the value returned by {@code data()} on the allocated tensor. For example:
*
* <pre>{@code
* FloatNdArray data = ...
Expand Down
8 changes: 7 additions & 1 deletion tensorflow-core/tensorflow-core-native/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -641,14 +641,20 @@

<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.6.0</version>
<version>3.7.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<additionalJOptions>
<additionalJOption>-Xmaxerrs</additionalJOption>
<additionalJOption>65536</additionalJOption>
<additionalJOption>-Xmaxwarns</additionalJOption>
<additionalJOption>65536</additionalJOption>
</additionalJOptions>
<failOnError>false</failOnError>
<minmemory>256m</minmemory>
<maxmemory>2048m</maxmemory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public static TF_Buffer newBuffer() {
return b;
}

/** Returns {@code newBufferFromString(new BytePointer(proto.toByteArray())), or null if proto is null or empty. */
/** Returns {@code newBufferFromString(new BytePointer(proto.toByteArray()))}, or null if proto is null or empty. */
public static TF_Buffer newBufferFromString(Message proto) {
if (proto == null) {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public AbstractTF_Graph(Pointer p) {
/**
* Calls TF_NewGraph(), and registers a deallocator.
*
* <p>Note {@link org.tensorflow.Graph} will call TF_DeleteGraph on close, so do not use this
* <p>Note {@code org.tensorflow.Graph} will call TF_DeleteGraph on close, so do not use this
* method when constructing a reference for use inside a {@code Graph} object.
*
* @return TF_Graph created. Do not call TF_DeleteGraph() on it.
Expand Down

0 comments on commit b0b3df0

Please sign in to comment.