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_r131578850
########## File path: python/mxnet/autograd.py ########## @@ -45,6 +45,28 @@ def set_training(is_train): ctypes.c_int(is_train), ctypes.byref(prev))) return bool(prev.value) +def is_recording(): + """Get status on recording/not recording. + + Returns + ------- + Current state of recording. + """ + curr = ctypes.c_bool() + check_call(_LIB.MXAutogradIsRecording(ctypes.byref(curr))) + return curr.value + +def is_training(): + """Get status on training/not training. + + Returns + ------- + Current state of training/inference. Review comment: inference -> predicting ---------------------------------------------------------------- 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