piiswrong commented on a change in pull request #7356: decouple record/train 
and add state readers
URL: https://github.com/apache/incubator-mxnet/pull/7356#discussion_r131579066
 
 

 ##########
 File path: python/mxnet/autograd.py
 ##########
 @@ -54,26 +76,28 @@ class RecordingStateScope(object):
             y = model(x)
             backward([y])
     """
-    def __init__(self, enter_state, is_train):
-        self._enter_state = enter_state
+    def __init__(self, is_record, is_train):
+        self._enter_is_record = is_record
         self._enter_is_train = is_train
-        self._prev = None
+        self._prev_is_record = None
         self._prev_is_train = None
 
     def __enter__(self):
-        self._prev = set_recording(self._enter_state)
-        self._prev_is_train = set_training(self._enter_is_train)
+        if self._enter_is_record is not None:
 
 Review comment:
   revert for now
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to