tensorflow / tensorflow/java

Shapes.reduceDims is difficult to understand

Open
#254 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
928
Forks
227
PR merge metrics
No merged PRs in 30d

Description

I find the documentation opaque:

  /**
   * Reshapes the operand by reducing the shape to the specified axis.
   *
   * @param <T> the type of Operand
   * @param scope current scope
   * @param operand the operand
   * @param axis the axis
   * @return the reshaped operand
   */
  @Endpoint(name = "reduceDims")
  public static <T extends TType> Operand<T> reduceDims(
      Scope scope, Operand<T> operand, Operand<TInt32> axis) {

I had no success searching for a similar function in Python TensorFlow. So I read the code, but it is fairly complex to follow.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Shapes.reduceDims method and read its current Javadoc and implementation. Compare the operation with the available TensorFlow behavior, then update the documentation so the reshape, axis, operand, and resulting shape are understandable; done when a reader can tell how reduceDims behaves without tracing complex code.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.