Beispiel #1
0
 def to_onehot(self, actions):
     actions = to_categorical(actions, num_classes=self.nb_actions)
     actions = actions.astype('float32')
     return actions
Beispiel #2
0
 def to_onehot(self, a1):
     a1 = to_categorical(a1, num_classes=self.nb_actions)
     a1 = a1.astype('float32')
     a1 = torch.from_numpy(a1)
     return a1