Skip to content

Commit

Permalink
action_probs: LongTensor to Tensor
Browse files Browse the repository at this point in the history
  • Loading branch information
Asugawara committed Dec 5, 2020
1 parent 7908ccc commit 5671c9f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions open_spiel/python/pytorch/nfsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@
import collections
import contextlib
import enum
import numpy as np
import os
import random
from absl import logging
import numpy as np


import torch
import torch.nn as nn
Expand Down Expand Up @@ -234,7 +235,7 @@ def _learn(self):

transitions = self._reservoir_buffer.sample(self._batch_size)
info_states = torch.Tensor([t.info_state for t in transitions])
action_probs = torch.LongTensor([t.action_probs for t in transitions])
action_probs = torch.Tensor([t.action_probs for t in transitions])
legal_actions_mask = torch.Tensor([t.legal_actions_mask for t in transitions])

self.optimizer.zero_grad()
Expand Down

0 comments on commit 5671c9f

Please sign in to comment.