@classmethod<EOL><INDENT>def load(cls, model, opt, meta, flag_gpu=None):<DEDENT>
mess = "<STR_LIT>"<EOL>assert os.path.exists(model), mess.format(model)<EOL>assert os.path.exists(opt), mess.format(opt)<EOL>assert os.path.exists(meta), mess.format(meta)<EOL>with open(meta, '<STR_LIT:r>') as f:<EOL><INDENT>meta = json.load(f)<EOL><DEDENT>if flag_gpu is not None:<EOL><INDENT>meta['<STR_LIT>'] = flag_gpu<EOL><DEDENT>loaded_class = cls(**meta)<EOL>serializers.load_hdf5(model, loaded_class.model)<EOL>loaded_class.opt.setup(loaded_class.model)<EOL>serializers.load_hdf5(opt, loaded_class.opt)<EOL>if meta['<STR_LIT>']:<EOL><INDENT>loaded_class.model = loaded_class.model.to_gpu()<EOL><DEDENT>return loaded_class<EOL>
Loads in model as a class instance with with the specified
           model and optimizer states.

        Parameters
        ----------
        model : str
            Path to the model state file.
        opt : str
            Path to the optimizer state file.
        meta : str
            Path to the class metadata state file.
        flag_gpu : bool
            Specifies whether to load the model to use gpu capabilities.

        Returns
        -------

        class instance of self.