@@ -121,7 +121,7 @@ public void exportMultipleFunctions() throws IOException {
121
121
}
122
122
}
123
123
try (SavedModelBundle model = SavedModelBundle .load (testFolder .toString ())) {
124
- assertEquals (2 , model .signatures ().size ());
124
+ assertEquals (3 , model .signatures ().size ());
125
125
TensorFunction f1 = model .function (Signature .DEFAULT_KEY );
126
126
assertNotNull (f1 );
127
127
try (TFloat32 x = TFloat32 .tensorOf (StdArrays .ndCopyOf (new float [] {2 , 2 }));
@@ -319,33 +319,6 @@ public void pythonTfFunction() {
319
319
}
320
320
}
321
321
322
- @ Test
323
- public void exportAndLoadInitializers () throws IOException {
324
- Path testFolder = Files .createTempDirectory ("tf-saved-model-export-test" );
325
- try (Graph g = new Graph ();
326
- Session s = new Session (g )) {
327
- Ops tf = Ops .create (g );
328
- Ops init = tf .withInitScope ();
329
- Operand <?> handle = init .withName ("variable" ).varHandleOp (TInt32 .class , Shape .scalar ());
330
- init .withName ("init" ).assignVariableOp (handle , init .constant (10 ));
331
-
332
- SessionFunction f =
333
- SessionFunction .create (
334
- Signature .builder ()
335
- .key ("f" )
336
- .output ("out" , tf .withName ("read" ).readVariableOp (handle , TInt32 .class ))
337
- .build (),
338
- s );
339
-
340
- SavedModelBundle .exporter (testFolder .toString ()).withFunction (f ).export ();
341
- }
342
-
343
- try (SavedModelBundle savedModel = SavedModelBundle .load (testFolder .toString ())) {
344
- TInt32 tensor = (TInt32 ) savedModel .session ().runner ().fetch ("read" , 0 ).run ().get (0 );
345
- assertEquals (10 , tensor .getInt ());
346
- }
347
- }
348
-
349
322
private static Signature buildGraphWithVariables (Ops tf , Shape xShape ) {
350
323
Placeholder <TFloat32 > x = tf .placeholder (TFloat32 .class , Placeholder .shape (xShape ));
351
324
Variable <TFloat32 > y =
0 commit comments