Skip to content
Merged
Show file tree
Hide file tree
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 @@ -3433,7 +3433,7 @@ public <U extends TType> OneHot<U> oneHot(Operand<? extends TNumber> indices,
* @return a constant tensor initialized with ones
* @throws IllegalArgumentException if the tensor type or shape cannot be initialized with ones.
*/
public <T extends TType, U extends TNumber> Ones<T> ones(Operand<U> dims, Class<T> type) {
public <T extends TType> Ones<T> ones(Operand<? extends TNumber> dims, Class<T> type) {
return Ones.create(scope, dims, type);
}

Expand Down Expand Up @@ -7674,7 +7674,7 @@ public <T extends TType> XlaSpmdShardToFullShape<T> xlaSpmdShardToFullShape(Oper
* @return a constant tensor initialized with zeros
* @throws IllegalArgumentException if the tensor type or shape cannot be initialized with zeros.
*/
public <T extends TType, U extends TNumber> Zeros<T> zeros(Operand<U> dims, Class<T> type) {
public <T extends TType> Zeros<T> zeros(Operand<? extends TNumber> dims, Class<T> type) {
return Zeros.create(scope, dims, type);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public final class Ones<T extends TType> implements Op, Operand<T> {
* @throws IllegalArgumentException if the tensor type or shape cannot be initialized with ones.
*/
@Endpoint
public static <T extends TType, U extends TNumber> Ones<T> create(Scope scope, Operand<U> dims, Class<T> type) {
public static <T extends TType> Ones<T> create(Scope scope, Operand<? extends TNumber> dims, Class<T> type) {
Scope onesScope = scope.withSubScope("Ones");
if (type == TString.class) {
throw new IllegalArgumentException("Can't create Ones of String DataType");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public final class Zeros<T extends TType> implements Op, Operand<T> {
*/
@Endpoint
@SuppressWarnings("unchecked")
public static <T extends TType, U extends TNumber> Zeros<T> create(Scope scope, Operand<U> dims, Class<T> type) {
public static <T extends TType> Zeros<T> create(Scope scope, Operand<? extends TNumber> dims, Class<T> type) {
Scope zerosScope = scope.withSubScope("Zeros");
Operand<T> zero;
if (type == TString.class) {
Expand Down