Skip to content

Commit 496191d

Browse files
authored
Update manual ops for new codegen (#196)
Signed-off-by: Ryan Nett <[email protected]>
1 parent d6d07cd commit 496191d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/Ops.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -3433,7 +3433,7 @@ public <U extends TType> OneHot<U> oneHot(Operand<? extends TNumber> indices,
34333433
* @return a constant tensor initialized with ones
34343434
* @throws IllegalArgumentException if the tensor type or shape cannot be initialized with ones.
34353435
*/
3436-
public <T extends TType, U extends TNumber> Ones<T> ones(Operand<U> dims, Class<T> type) {
3436+
public <T extends TType> Ones<T> ones(Operand<? extends TNumber> dims, Class<T> type) {
34373437
return Ones.create(scope, dims, type);
34383438
}
34393439

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

tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/core/Ones.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public final class Ones<T extends TType> implements Op, Operand<T> {
4949
* @throws IllegalArgumentException if the tensor type or shape cannot be initialized with ones.
5050
*/
5151
@Endpoint
52-
public static <T extends TType, U extends TNumber> Ones<T> create(Scope scope, Operand<U> dims, Class<T> type) {
52+
public static <T extends TType> Ones<T> create(Scope scope, Operand<? extends TNumber> dims, Class<T> type) {
5353
Scope onesScope = scope.withSubScope("Ones");
5454
if (type == TString.class) {
5555
throw new IllegalArgumentException("Can't create Ones of String DataType");

tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/core/Zeros.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public final class Zeros<T extends TType> implements Op, Operand<T> {
5050
*/
5151
@Endpoint
5252
@SuppressWarnings("unchecked")
53-
public static <T extends TType, U extends TNumber> Zeros<T> create(Scope scope, Operand<U> dims, Class<T> type) {
53+
public static <T extends TType> Zeros<T> create(Scope scope, Operand<? extends TNumber> dims, Class<T> type) {
5454
Scope zerosScope = scope.withSubScope("Zeros");
5555
Operand<T> zero;
5656
if (type == TString.class) {

0 commit comments

Comments
 (0)