Skip to content

Support tf.Tensor construction via Operation argument #352

@khatchad

Description

@khatchad

The tf.Tensor(op, value_index, dtype) constructor allows creating a tensor handle from an existing operation output. To support shape inference for such tensors, we need to:

  1. Identify the operation (or generator) that the op argument corresponds to.
  2. Delegate the shape computation to that generator, using the value_index to select the correct output.

This requires the ability to trace the op argument back to its creating logic (e.g., a tf.matmul call) and instantiate the appropriate TensorGenerator.

This task is blocked by #340, which addresses the general mechanism for operations involving calls to other tensor generators.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestjavaPull requests that update Java codetensor shapes

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions