Support A2C

This commit is contained in:
Shangtong Zhang
2018-01-31 16:19:33 -07:00
parent 63c5d5ea54
commit ceaf83bca3
7 changed files with 201 additions and 123 deletions
+2
View File
@@ -18,8 +18,10 @@ class BasicNet:
if self.gpu:
self.cuda()
self.FloatTensor = torch.cuda.FloatTensor
self.LongTensor = torch.cuda.LongTensor
else:
self.FloatTensor = torch.FloatTensor
self.LongTensor = torch.LongTensor
def to_torch_variable(self, x, dtype='float32'):
if isinstance(x, Variable):