mirror of
https://github.com/wassname/DeepRL.git
synced 2026-09-11 11:53:01 +08:00
Support A2C
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user