@@ -185,9 +185,9 @@ public void assertProtoEquals(object toProto, object o)
185185
186186 #region tensor evaluation and test session
187187
188- private Session _cached_session = null ;
189- private Graph _cached_graph = null ;
190- private object _cached_config = null ;
188+ private Session ? _cached_session = null ;
189+ private Graph ? _cached_graph = null ;
190+ private object ? _cached_config = null ;
191191 private bool _cached_force_gpu = false ;
192192
193193 private void _ClearCachedSession ( )
@@ -237,7 +237,7 @@ protected object _eval_tensor(object tensor)
237237 /// </summary>
238238 public T evaluate < T > ( Tensor tensor )
239239 {
240- object result = null ;
240+ object ? result = null ;
241241 // if context.executing_eagerly():
242242 // return self._eval_helper(tensors)
243243 // else:
@@ -274,7 +274,7 @@ public T evaluate<T>(Tensor tensor)
274274
275275 ///Returns a TensorFlow Session for use in executing tests.
276276 public Session cached_session (
277- Graph graph = null , object config = null , bool use_gpu = false , bool force_gpu = false )
277+ Graph ? graph = null , object ? config = null , bool use_gpu = false , bool force_gpu = false )
278278 {
279279 // This method behaves differently than self.session(): for performance reasons
280280 // `cached_session` will by default reuse the same session within the same
@@ -325,7 +325,7 @@ public Session cached_session(
325325 }
326326
327327 //Returns a TensorFlow Session for use in executing tests.
328- public Session session ( Graph graph = null , object config = null , bool use_gpu = false , bool force_gpu = false )
328+ public Session session ( Graph ? graph = null , object ? config = null , bool use_gpu = false , bool force_gpu = false )
329329 {
330330 //Note that this will set this session and the graph as global defaults.
331331
@@ -359,7 +359,7 @@ public Session session(Graph graph = null, object config = null, bool use_gpu =
359359 // A Session object that should be used as a context manager to surround
360360 // the graph building and execution code in a test case.
361361
362- Session s = null ;
362+ Session ? s = null ;
363363 //if (context.executing_eagerly())
364364 // yield None
365365 //else
@@ -448,8 +448,8 @@ private Session _create_session(Graph graph, object cfg, bool forceGpu)
448448 }
449449
450450 private Session _get_cached_session (
451- Graph graph = null ,
452- object config = null ,
451+ Graph ? graph = null ,
452+ object ? config = null ,
453453 bool force_gpu = false ,
454454 bool crash_if_inconsistent_args = true )
455455 {
0 commit comments