def from_checkpoint(cls, checkpoint):
        '''
        Restore the model from a checkpoint
        
        Args:
            checkpoint (dict): the checkpoint attributes generated by checkpoint_attributes()
        '''
        
        agent = cls(
            num_actions=checkpoint['num_actions'],
            state_shape=checkpoint['state_shape'],
            mlp_layers=checkpoint['mlp_layers'],
        )
        
        agent.mlp.load_state_dict(checkpoint['mlp'])
        return agent

        Restore the model from a checkpoint
        
        Args:
            checkpoint (dict): the checkpoint attributes generated by checkpoint_attributes()
        
rlcard/agents/nfsp_agent.py