@classmethod<EOL><INDENT>def load(cls, filename_or_handle):<DEDENT>
assert not isinstance(cls, Network),'<STR_LIT>'<EOL>if isinstance(filename_or_handle, util.basestring):<EOL><INDENT>opener = gzip.open if filename_or_handle.lower().endswith('<STR_LIT>') else open<EOL>handle = opener(filename_or_handle, '<STR_LIT:rb>')<EOL><DEDENT>else:<EOL><INDENT>handle = filename_or_handle<EOL><DEDENT>model = pickle.load(handle)<EOL>if isinstance(filename_or_handle, util.basestring):<EOL><INDENT>handle.close()<EOL><DEDENT>util.log('<STR_LIT>', filename_or_handle)<EOL>return model<EOL>
Load a saved network from disk.

        Parameters
        ----------
        filename_or_handle : str or file handle
            Load the state of this network from a pickle file. If this parameter
            is a string, it names the file where the pickle will be saved. If it
            is a file-like object, this object will be used for reading the
            pickle. If the filename ends in ".gz" then the output will
            automatically be gunzipped.