mirror of
https://git.freebsd.org/ports.git
synced 2025-04-30 02:26:38 -04:00
Sponsored by: Future Crew, LLC Pull Request: https://github.com/freebsd/freebsd-ports/pull/361
12 lines
498 B
Python
12 lines
498 B
Python
--- reinforcement_learning/reinforce.py.orig 2025-02-09 16:56:58 UTC
|
|
+++ reinforcement_learning/reinforce.py
|
|
@@ -9,6 +9,9 @@ from torch.distributions import Categorical
|
|
import torch.optim as optim
|
|
from torch.distributions import Categorical
|
|
|
|
+# numpy.bool8 is deprecated since version 1.24.0
|
|
+if not hasattr(np, 'bool8'):
|
|
+ np.bool8 = np.bool_
|
|
|
|
parser = argparse.ArgumentParser(description='PyTorch REINFORCE example')
|
|
parser.add_argument('--gamma', type=float, default=0.99, metavar='G',
|