Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

package org.tensorflow;

import org.tensorflow.ndarray.Shape;
import org.tensorflow.op.Op;
import org.tensorflow.types.family.TType;

Expand Down Expand Up @@ -76,4 +77,18 @@ default Tensor<T> asTensor() {
default T data() {
return asOutput().tensor().data();
}

/**
* Returns the build-time shape of this operand. May be only partially known.
*/
default Shape shape(){
Copy link
Collaborator

@karllessard karllessard Nov 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we want to mark the same methods in Output as overrides now (@Override) and probably inherit the javadoc

return asOutput().shape();
}

/**
* Returns the {@link DataType} of this operand.
*/
default DataType<T> dataType(){
return asOutput().dataType();
}
}