File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4242; ;
4343; ; ## Pendulum environment
4444; ;
45- ; ; 
45+ ; ; 
4646; ;
4747; ; First we implement a simple pendulum environment to test the PPO algorithm.
4848; ; In order to be able to switch environments, we define a protocol according to the environment abstract class used in OpenAI's gym.
267267 (async/<!! done-chan))
268268 (System/exit 0 ))
269269
270+ ; ; 
271+
270272; ; ## Neural networks
271273; ;
272274; ; PPO is a machine learning technique using backpropagation to learn the parameters of two neural networks.
332334; ; ```bash
333335; ; uv run clj
334336; ; ```
337+ ; ;
338+ ; ; Now you should be able to import the Python modules using *require-python*.
339+ (require-python '[builtins :as python]
340+ '[torch :as torch]
341+ '[torch.nn :as nn]
342+ '[torch.nn.functional :as F]
343+ '[torch.optim :as optim]
344+ '[torch.distributions :refer (Beta )])
You can’t perform that action at this time.
0 commit comments