def __init__(self, n_actions): super(A3CMLP, self).__init__() self.head = IndependentHead() self.pi = FCSoftmaxPolicy(self.head.n_output_channels, n_actions) self.v = FCVFunction(self.head.n_output_channels) self.reset_state()
def __init__(self, n_actions): super(A3CLSTM, self).__init__() self.head = NIPSDQNHead() self.pi = FCSoftmaxPolicy(self.head.n_output_channels, n_actions) self.v = FCVFunction(self.head.n_output_channels) self.lstm = nn.LSTMCell(self.head.n_output_channels, self.head.n_output_channels) self.reset_state()