/usr/local/lib64/python3.6/site-packages/caffe2/python/onnx/__pycache__
NameSizeModeActions
backend.cpython-36.pyc289010644editdlrm
backend_cpp_rep.cpython-36.pyc18690644editdlrm
backend_rep.cpython-36.pyc20610644editdlrm
error.cpython-36.pyc4500644editdlrm
frontend.cpython-36.pyc103440644editdlrm
helper.cpython-36.pyc36290644editdlrm
onnxifi.cpython-36.pyc16310644editdlrm
test_onnxifi.cpython-36.pyc61310644editdlrm
workspace.cpython-36.pyc25900644editdlrm
__init__.cpython-36.pyc1540644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/caffe2/python/onnx/__pycache__/workspace.cpython-36.pyc (2590B)
3 Eg @s8ddlZddlmZGdddeZGdddeZdS)N) workspacec@s$eZdZddZddZddZdS) _WorkspaceCtxcCs||_g|_dS)N) workspace_idworkspace_stack)selfrrH/usr/local/lib64/python3.6/site-packages/caffe2/python/onnx/workspace.py__init__sz_WorkspaceCtx.__init__cCs$|jjtjtj|jdddS)NT)create_if_missing)rappendrZCurrentWorkspaceSwitchWorkspacer)rrrr __enter__sz_WorkspaceCtx.__enter__cCs|jj}tj|dddS)NT)r )rpoprr )rexc_type exc_value tracebackwrrr__exit__s z_WorkspaceCtx.__exit__N)__name__ __module__ __qualname__r r rrrrrrsrc@s(eZdZdZddZddZddZdS) WorkspaceaA An object representing a Caffe2 workspace. It is a context manager, so you can say 'with workspace:' to use the represented workspace as your global workspace. It also supports every method supported by caffe2.python.workspace, but instead of running these operations in the global workspace, it runs them in the workspace represented by this object. When this object goes dead, the workspace (and all nets and blobs within it) are freed. Why do we need this class? Caffe2's workspace model is very "global state" oriented, in that there is always some ambient global workspace you are working in which holds on to all of your networks and blobs. This class makes it possible to work with workspaces more locally, and without forgetting to deallocate everything in the end. cCstttj|_dS)N)rstruuiduuid4_ctx)rrrrr 5szWorkspace.__init__csfdd}|S)Nc s"jtt||SQRXdS)N)rgetattrr)argskwargs)attrrrrf=sz Workspace.__getattr__..fr)rrr r)rrr __getattr__<szWorkspace.__getattr__cCs |jdS)N)ZResetWorkspace)rrrr__del__BszWorkspace.__del__N)rrr__doc__r r!r"rrrrr%sr)rZ caffe2.pythonrobjectrrrrrr s