Skip to content

Commit f215237

Browse files
committed
Start of function refactor
Signed-off-by: Ryan Nett <[email protected]>
1 parent f8f5087 commit f215237

File tree

13 files changed

+639
-471
lines changed

13 files changed

+639
-471
lines changed

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import java.util.List;
2222
import java.util.Map;
2323
import org.tensorflow.ConcreteFunction;
24-
import org.tensorflow.DefinedFunction;
2524
import org.tensorflow.DeviceSpec;
2625
import org.tensorflow.EagerSession;
2726
import org.tensorflow.ExecutionEnvironment;
@@ -351,10 +350,10 @@ public final class Ops {
351350

352351
public final SignalOps signal;
353352

354-
public final QuantizationOps quantization;
355-
356353
public final TrainOps train;
357354

355+
public final QuantizationOps quantization;
356+
358357
private final Scope scope;
359358

360359
private Ops(Scope scope) {
@@ -376,8 +375,8 @@ private Ops(Scope scope) {
376375
math = new MathOps(this);
377376
audio = new AudioOps(this);
378377
signal = new SignalOps(this);
379-
quantization = new QuantizationOps(this);
380378
train = new TrainOps(this);
379+
quantization = new QuantizationOps(this);
381380
}
382381

383382
/**
@@ -1075,15 +1074,15 @@ public Bucketize bucketize(Operand<? extends TNumber> input, List<Float> boundar
10751074
/**
10761075
* empty
10771076
*/
1078-
public Map<String, Operand<?>> call(ConcreteFunction function,
1079-
Map<String, Operand<?>> arguments) {
1080-
return Function.call(scope, function, arguments);
1077+
public Operand<?> call(ConcreteFunction function, Operand<?> argument) {
1078+
return Function.call(scope, function, argument);
10811079
}
10821080

10831081
/**
10841082
* empty
10851083
*/
1086-
public List<Operand<?>> call(DefinedFunction function, List<Operand<?>> arguments) {
1084+
public Map<String, Operand<?>> call(ConcreteFunction function,
1085+
Map<String, Operand<?>> arguments) {
10871086
return Function.call(scope, function, arguments);
10881087
}
10891088

@@ -1853,13 +1852,14 @@ public Constant<TInt32> constant(Shape shape, IntDataBuffer data) {
18531852
}
18541853

18551854
/**
1856-
* Creates a scalar of {@code type}, with the value of {@code number}.
1857-
* {@code number} may be truncated if it does not fit in the target type.
1855+
* Creates a scalar of {@code type}, with the value of {@code number}. {@code number} may be truncated if it does not
1856+
* fit in the target type.
18581857
*
18591858
* @param type the type of tensor to create. Must be concrete (i.e. not {@link org.tensorflow.types.family.TFloating})
18601859
* @param number the value of the tensor
18611860
* @return a constant of the passed type
1862-
* @throws IllegalArgumentException if the type is abstract (i.e. {@link org.tensorflow.types.family.TFloating}) or unknown.
1861+
* @throws IllegalArgumentException if the type is abstract (i.e. {@link org.tensorflow.types.family.TFloating}) or
1862+
* unknown.
18631863
*/
18641864
public <T extends TNumber> Constant<T> constant(Class<T> type, Number number) {
18651865
return Constant.tensorOf(scope, type, number);
@@ -1911,14 +1911,14 @@ public <T extends TType> Constant<T> constantOf(T tensor) {
19111911
}
19121912

19131913
/**
1914-
* Creates a scalar of the same type as {@code toMatch}, with the value of {@code number}.
1915-
* {@code number} may be truncated if it does not fit in the target type.
1914+
* Creates a scalar of the same type as {@code toMatch}, with the value of {@code number}. {@code number} may be
1915+
* truncated if it does not fit in the target type.
19161916
*
19171917
* @param toMatch the operand providing the target type
19181918
* @param number the value of the tensor
19191919
* @return a constant with the same type as {@code toMatch}
1920-
* @see Ops#constant(Class, Number)
19211920
* @throws IllegalArgumentException if the type is unknown (which should be impossible).
1921+
* @see Ops#constant(Class, Number)
19221922
*/
19231923
public <T extends TNumber> Constant<T> constantOfSameType(Operand<T> toMatch, Number number) {
19241924
return Constant.tensorOfSameType(scope, toMatch, number);

0 commit comments

Comments
 (0)