Skip to content

Commit 27a74d3

Browse files
committed
Add line breaks
1 parent 92d0253 commit 27a74d3

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

src/ppo/main.clj

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,15 +1061,18 @@
10611061

10621062
(let [angle-values (torch/linspace (- PI) PI 854)
10631063
speed-values (torch/linspace 1.0 -1.0 480)
1064-
grid (torch/meshgrid speed-values angle-values :indexing "ij")
1065-
cos-angle (torch/cos (last grid))
1066-
sin-angle (torch/sin (last grid))
1064+
grid (torch/meshgrid speed-values angle-values :indexing "ij")
1065+
cos-angle (torch/cos (last grid))
1066+
sin-angle (torch/sin (last grid))
10671067
observations (torch/stack [(py. cos-angle ravel)
10681068
(py. sin-angle ravel)
10691069
(py. (first grid) ravel)]
10701070
:axis 1)
1071-
actions (without-gradient (py. (py. (py. actor deterministic_act observations) reshape 480 854) numpy))
1072-
actions-tensor (dtype/elemwise-cast (dtt/ensure-tensor (py/->jvm actions)) :float32)]
1071+
actions (without-gradient
1072+
(py. (py. (py. actor deterministic_act observations)
1073+
reshape 480 854) numpy))
1074+
actions-tensor (dtype/elemwise-cast (dtt/ensure-tensor (py/->jvm actions))
1075+
:float32)]
10731076
(bufimg/tensor->image (dfn/* actions-tensor 255)))
10741077
;; This image shows the motor control input as a function of pendulum angle and angular velocity.
10751078
;; As one can see, the pendulum is decelerated when the speed is high (dark values at the top of the image).

0 commit comments

Comments
 (0)