set_recording

set_recording(is_recording)

Set status to recording/not recording. When recording, graph will be constructed for gradient computation.

Parameters:
is_recording: bool
Returns:
previous state before this set.