Unverified Commit bfdc5ccb authored by Frank Lee's avatar Frank Lee Committed by GitHub
Browse files

[context] maintain the context object in with statement (#1073)

parent c5cd3b0f
......@@ -72,6 +72,7 @@ class InsertPostInitMethodToModuleSubClasses(object):
torch.nn.modules.module.Module.__init_subclass__ = classmethod(_init_subclass)
self._pre_context_exec()
return self
def __exit__(self, exc_type, exc_value, traceback):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment