File tree Expand file tree Collapse file tree 6 files changed +278
-362
lines changed
tensorflow-core/tensorflow-core-api/src Expand file tree Collapse file tree 6 files changed +278
-362
lines changed Original file line number Diff line number Diff line change 3131import org .tensorflow .internal .c_api .TFE_ContextOptions ;
3232import org .tensorflow .internal .c_api .TF_Status ;
3333import org .tensorflow .proto .framework .ConfigProto ;
34- import org .tensorflow .variable .MutableVariable ;
34+ import org .tensorflow .variable .Variable ;
3535
3636/**
3737 * An environment for executing TensorFlow operations eagerly.
@@ -302,15 +302,15 @@ void detach(Pointer... resources) {
302302 }
303303 }
304304
305- private final Map <String , MutableVariable <?>> variables = new LinkedHashMap <>();
305+ private final Map <String , Variable <?>> variables = new LinkedHashMap <>();
306306
307307 @ Override
308- public void registerVariable (MutableVariable <?> variable ) {
308+ public void registerVariable (Variable <?> variable ) {
309309 variables .put (variable .getName (), variable );
310310 }
311311
312312 @ Override
313- public Map <String , MutableVariable <?>> variables () {
313+ public Map <String , Variable <?>> variables () {
314314 return Collections .unmodifiableMap (variables );
315315 }
316316
Original file line number Diff line number Diff line change 1616package org .tensorflow ;
1717
1818import java .util .Map ;
19- import org .tensorflow .variable .MutableVariable ;
19+ import org .tensorflow .variable .Variable ;
2020
2121/** Defines an environment for creating and executing TensorFlow {@link Operation}s. */
2222public interface ExecutionEnvironment {
@@ -44,14 +44,12 @@ enum Types {
4444 */
4545 Types environmentType ();
4646
47- Map <String , MutableVariable <?>> variables ();
47+ Map <String , Variable <?>> variables ();
4848
4949 /**
50- * Registers a variable with this execution environment.
51- * @deprecated Done automatically in Variable's constructor, should only be used internally.
50+ * Registers a variable with this execution environment. For internal use only.
5251 */
53- @ Deprecated
54- void registerVariable (MutableVariable <?> variable );
52+ void registerVariable (Variable <?> variable );
5553
5654 default boolean isEager () {
5755 return environmentType () == Types .EAGER ;
Original file line number Diff line number Diff line change 5757import org .tensorflow .proto .util .SaverDef ;
5858import org .tensorflow .types .TString ;
5959import org .tensorflow .types .family .TType ;
60- import org .tensorflow .variable .MutableVariable ;
60+ import org .tensorflow .variable .Variable ;
6161
6262
6363/**
@@ -448,15 +448,15 @@ synchronized SaverDef saverDef() {
448448
449449 private final List <Op > initializers = new ArrayList <>();
450450
451- private final Map <String , MutableVariable <?>> variables = new LinkedHashMap <>();
451+ private final Map <String , Variable <?>> variables = new LinkedHashMap <>();
452452
453453 @ Override
454- public void registerVariable (MutableVariable <?> variable ) {
454+ public void registerVariable (Variable <?> variable ) {
455455 variables .put (variable .getName (), variable );
456456 }
457457
458458 @ Override
459- public Map <String , MutableVariable <?>> variables () {
459+ public Map <String , Variable <?>> variables () {
460460 return Collections .unmodifiableMap (variables );
461461 }
462462
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments