21
21
import java .util .List ;
22
22
import java .util .Map ;
23
23
import org .tensorflow .ConcreteFunction ;
24
- import org .tensorflow .DefinedFunction ;
25
24
import org .tensorflow .DeviceSpec ;
26
25
import org .tensorflow .EagerSession ;
27
26
import org .tensorflow .ExecutionEnvironment ;
@@ -351,10 +350,10 @@ public final class Ops {
351
350
352
351
public final SignalOps signal ;
353
352
354
- public final QuantizationOps quantization ;
355
-
356
353
public final TrainOps train ;
357
354
355
+ public final QuantizationOps quantization ;
356
+
358
357
private final Scope scope ;
359
358
360
359
private Ops (Scope scope ) {
@@ -376,8 +375,8 @@ private Ops(Scope scope) {
376
375
math = new MathOps (this );
377
376
audio = new AudioOps (this );
378
377
signal = new SignalOps (this );
379
- quantization = new QuantizationOps (this );
380
378
train = new TrainOps (this );
379
+ quantization = new QuantizationOps (this );
381
380
}
382
381
383
382
/**
@@ -1075,15 +1074,15 @@ public Bucketize bucketize(Operand<? extends TNumber> input, List<Float> boundar
1075
1074
/**
1076
1075
* empty
1077
1076
*/
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 );
1081
1079
}
1082
1080
1083
1081
/**
1084
1082
* empty
1085
1083
*/
1086
- public List <Operand <?>> call (DefinedFunction function , List <Operand <?>> arguments ) {
1084
+ public Map <String , Operand <?>> call (ConcreteFunction function ,
1085
+ Map <String , Operand <?>> arguments ) {
1087
1086
return Function .call (scope , function , arguments );
1088
1087
}
1089
1088
@@ -1853,13 +1852,14 @@ public Constant<TInt32> constant(Shape shape, IntDataBuffer data) {
1853
1852
}
1854
1853
1855
1854
/**
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.
1858
1857
*
1859
1858
* @param type the type of tensor to create. Must be concrete (i.e. not {@link org.tensorflow.types.family.TFloating})
1860
1859
* @param number the value of the tensor
1861
1860
* @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.
1863
1863
*/
1864
1864
public <T extends TNumber > Constant <T > constant (Class <T > type , Number number ) {
1865
1865
return Constant .tensorOf (scope , type , number );
@@ -1911,14 +1911,14 @@ public <T extends TType> Constant<T> constantOf(T tensor) {
1911
1911
}
1912
1912
1913
1913
/**
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.
1916
1916
*
1917
1917
* @param toMatch the operand providing the target type
1918
1918
* @param number the value of the tensor
1919
1919
* @return a constant with the same type as {@code toMatch}
1920
- * @see Ops#constant(Class, Number)
1921
1920
* @throws IllegalArgumentException if the type is unknown (which should be impossible).
1921
+ * @see Ops#constant(Class, Number)
1922
1922
*/
1923
1923
public <T extends TNumber > Constant <T > constantOfSameType (Operand <T > toMatch , Number number ) {
1924
1924
return Constant .tensorOfSameType (scope , toMatch , number );
0 commit comments