def __init__(self, model, encoder): Agent.__init__(self) self._model = model self._encoder = encoder self._collector = None self._temperature = 0.0 board = goboard.Board(19, 19) self.board_ext = goboard.Board_Ext(board)
def __init__(self, policy_agent, fast_policy_agent, value_agent, lambda_value=0.5, num_simulations=1000, depth=50, rollout_limit=100): Agent.__init__(self) self.policy = policy_agent self.rollout_policy = fast_policy_agent self.value = value_agent self.lambda_value = lambda_value self.num_simulations = num_simulations self.depth = depth self.rollout_limit = rollout_limit self.root = AlphaGoNode()
def __init__(self, model, encoder): Agent.__init__(self) self.model = model self.encoder = encoder
def __init__(self, model, encoder): Agent.__init__(self) self._model = model self._encoder = encoder self._collector = None
def __init__(self): Agent.__init__(self) self.dim = None self.point_cache = []
def __init__(self, agent, strategy=None): Agent.__init__(self) self.agent = agent self.strategy = strategy if strategy is not None \ else TerminationStrategy()
def __init__(self, max_depth, eval_fn): Agent.__init__(self) self.max_depth = max_depth self.eval_fn = eval_fn
def __init__(self, num_rounds, temperature): Agent.__init__(self) self.num_rounds = num_rounds self.temperature = temperature
def __init__(self, model, encoder): Agent.__init__(self) self._model = model # A Keras Sequential model instance self._encoder = encoder # Implements the Encoder interface self._collector = None self._temperature = 0.0
def __init__(self): Agent.__init__(self) self.model = nn.DataParallel(Model()).to(device) checkpoint = torch.load("go_model.pt") self.model.module.load_state_dict(checkpoint["model_state_dict"])
def __init__(self, model, encoder, print_probs = False): Agent.__init__(self) self.model = model self.encoder = encoder self.print_probs = print_probs