@classmethod<EOL><INDENT>def load(cls, enc, dec, disc, enc_opt, dec_opt, disc_opt, meta, flag_gpu=None):<DEDENT>
mess = "<STR_LIT>"<EOL>assert os.path.exists(enc), mess.format(enc)<EOL>assert os.path.exists(dec), mess.format(dec)<EOL>assert os.path.exists(disc), mess.format(disc)<EOL>assert os.path.exists(dec_opt), mess.format(dec_opt)<EOL>assert os.path.exists(disc_opt), mess.format(disc_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(enc, loaded_class.enc)<EOL>serializers.load_hdf5(dec, loaded_class.dec)<EOL>serializers.load_hdf5(disc, loaded_class.disc)<EOL>loaded_class.enc_opt.setup(loaded_class.enc)<EOL>loaded_class.dec_opt.setup(loaded_class.dec)<EOL>loaded_class.disc_opt.setup(loaded_class.disc)<EOL>serializers.load_hdf5(enc_opt, loaded_class.enc_opt)<EOL>serializers.load_hdf5(dec_opt, loaded_class.dec_opt)<EOL>serializers.load_hdf5(disc_opt, loaded_class.disc_opt)<EOL>if meta['<STR_LIT>']:<EOL><INDENT>loaded_class.enc.to_gpu()<EOL>loaded_class.dec.to_gpu()<EOL>loaded_class.disc.to_gpu()<EOL><DEDENT>return loaded_class<EOL>
Loads in model as a class instance with with the specified
           model and optimizer states.

        Parameters
        ----------
        enc : str
            Path to the encoder state file.
        dec : str
            Path to the decoder/generator state file.
        disc : str
            Path to the discriminator state file.
        enc_opt : str
            Path to the encoder optimizer state file.
        dec_opt : str
            Path to the decoder/generator optimizer state file.
        disc_opt : str
            Path to the discriminator 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.