|
21 | 21 | import java.util.List;
|
22 | 22 | import java.util.Map;
|
23 | 23 | import org.tensorflow.ConcreteFunction;
|
| 24 | +import org.tensorflow.DefinedFunction; |
24 | 25 | import org.tensorflow.DeviceSpec;
|
25 | 26 | import org.tensorflow.EagerSession;
|
26 | 27 | import org.tensorflow.ExecutionEnvironment;
|
27 |
| -import org.tensorflow.GraphFunction; |
28 |
| -import org.tensorflow.NamedGraphFunction; |
29 | 28 | import org.tensorflow.Operand;
|
30 | 29 | import org.tensorflow.ndarray.BooleanNdArray;
|
31 | 30 | import org.tensorflow.ndarray.ByteNdArray;
|
@@ -1072,100 +1071,18 @@ public Bucketize bucketize(Operand<? extends TNumber> input, List<Float> boundar
|
1072 | 1071 | }
|
1073 | 1072 |
|
1074 | 1073 | /**
|
1075 |
| - * Call {@code function}, adding it to the execution environment if it isn't already present. The inputs and outputs |
1076 |
| - * are keyed by the names set in the {@code ConcreteFunction}'s {@code Signature}. |
1077 |
| - * |
1078 |
| - * @param function the function to call |
1079 |
| - * @param inputs the inputs to the function |
1080 |
| - * @return the outputs of the function |
1081 |
| - */ |
1082 |
| - public Map<String, Operand<?>> callConcreteFunction(ConcreteFunction function, |
1083 |
| - Operand<?>... inputs) { |
1084 |
| - return Function.callConcreteFunction(scope, function, inputs); |
1085 |
| - } |
1086 |
| - |
1087 |
| - /** |
1088 |
| - * Call {@code function}, adding it to the execution environment if it isn't already present. The inputs and outputs |
1089 |
| - * are keyed by the names set in the {@code ConcreteFunction}'s {@code Signature}. |
1090 |
| - * |
1091 |
| - * @param function the function to call |
1092 |
| - * @param inputs the inputs to the function |
1093 |
| - * @return the outputs of the function |
1094 |
| - */ |
1095 |
| - public Map<String, Operand<?>> callConcreteFunction(ConcreteFunction function, |
1096 |
| - List<Operand<?>> inputs) { |
1097 |
| - return Function.callConcreteFunction(scope, function, inputs); |
1098 |
| - } |
1099 |
| - |
1100 |
| - /** |
1101 |
| - * Call {@code function}, adding it to the execution environment if it isn't already present. The inputs and outputs |
1102 |
| - * are keyed by the names set in the {@code ConcreteFunction}'s {@code Signature}. |
1103 |
| - * |
1104 |
| - * @param function the function to call |
1105 |
| - * @param inputs the inputs to the function |
1106 |
| - * @return the outputs of the function |
1107 |
| - */ |
1108 |
| - public Map<String, Operand<?>> callConcreteFunction(ConcreteFunction function, |
1109 |
| - Map<String, Operand<?>> inputs) { |
1110 |
| - return Function.callConcreteFunction(scope, function, inputs); |
1111 |
| - } |
1112 |
| - |
1113 |
| - /** |
1114 |
| - * Call {@code function}, adding it to the execution environment if it isn't already present. |
1115 |
| - * |
1116 |
| - * @param function the function to call |
1117 |
| - * @param inputs the inputs to the function |
1118 |
| - * @return the outputs of the function |
| 1074 | + * empty |
1119 | 1075 | */
|
1120 |
| - public List<Operand<?>> callFunction(GraphFunction function, List<Operand<?>> inputs) { |
1121 |
| - return Function.callFunction(scope, function, inputs); |
| 1076 | + public Map<String, Operand<?>> call(ConcreteFunction function, |
| 1077 | + Map<String, Operand<?>> arguments) { |
| 1078 | + return Function.call(scope, function, arguments); |
1122 | 1079 | }
|
1123 | 1080 |
|
1124 | 1081 | /**
|
1125 |
| - * Call {@code function}, adding it to the execution environment if it isn't already present. |
1126 |
| - * |
1127 |
| - * @param function the function to call |
1128 |
| - * @param inputs the inputs to the function |
1129 |
| - * @return the outputs of the function |
1130 |
| - */ |
1131 |
| - public List<Operand<?>> callFunction(GraphFunction function, Operand<?>... inputs) { |
1132 |
| - return Function.callFunction(scope, function, inputs); |
1133 |
| - } |
1134 |
| - |
1135 |
| - /** |
1136 |
| - * Call {@code function}, adding it to the execution environment if it isn't already present. |
1137 |
| - * |
1138 |
| - * @param function the function to call |
1139 |
| - * @param inputs the inputs to the function |
1140 |
| - * @return the outputs of the function |
1141 |
| - */ |
1142 |
| - public Map<String, Operand<?>> callNamedFunction(NamedGraphFunction function, |
1143 |
| - Map<String, Operand<?>> inputs) { |
1144 |
| - return Function.callNamedFunction(scope, function, inputs); |
1145 |
| - } |
1146 |
| - |
1147 |
| - /** |
1148 |
| - * Call {@code function}, adding it to the execution environment if it isn't already present. |
1149 |
| - * |
1150 |
| - * @param function the function to call |
1151 |
| - * @param inputs the inputs to the function |
1152 |
| - * @return the outputs of the function |
1153 |
| - */ |
1154 |
| - public Map<String, Operand<?>> callNamedFunction(NamedGraphFunction function, |
1155 |
| - Operand<?>... inputs) { |
1156 |
| - return Function.callNamedFunction(scope, function, inputs); |
1157 |
| - } |
1158 |
| - |
1159 |
| - /** |
1160 |
| - * Call {@code function}, adding it to the execution environment if it isn't already present. |
1161 |
| - * |
1162 |
| - * @param function the function to call |
1163 |
| - * @param inputs the inputs to the function |
1164 |
| - * @return the outputs of the function |
| 1082 | + * empty |
1165 | 1083 | */
|
1166 |
| - public Map<String, Operand<?>> callNamedFunction(NamedGraphFunction function, |
1167 |
| - List<Operand<?>> inputs) { |
1168 |
| - return Function.callNamedFunction(scope, function, inputs); |
| 1084 | + public List<Operand<?>> call(DefinedFunction function, List<Operand<?>> arguments) { |
| 1085 | + return Function.call(scope, function, arguments); |
1169 | 1086 | }
|
1170 | 1087 |
|
1171 | 1088 | /**
|
|
0 commit comments