Commit 592cb6c7 authored by Ibrahim's avatar Ibrahim
Browse files

bug in batchsize when unspecified in update()

parent 735aa60d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -155,7 +155,7 @@ class PPO:
        
        # Optimize policy for multiple epochs:
        mb_losses, mb_vlosses, mb_plosses = [], [], []
        batchsize = len(ret) if batchsize is not None else batchsize
        batchsize = len(ret) if batchsize is None else batchsize
        for e in range(epochs):
            permutations = torch.randperm(ret.size()[0])
            # iterate over minibatches (mb) for stochastic updates