;;;NETTOOL3 CREATED


(de nettool-net ()
  (let ((input (new c-layer '("input" (20 20) t () () () () () t) 103 130 120
                    120 ))
        (hid-den (new c-layer '("hid-den" (1 40) () t () () () t ()) 311.319
                      50.7112 7 280 ))
        (output (new c-layer '("output" (1 40) () t () () () t ()) 421.319
                     50.7112 7 280 )) )
    (new c-connection input hid-den
         (list ct-connect '(1 1) '(1 1)) )
    (new c-connection hid-den output
         (list ct-connect '(1 1) '(1 1)) ) ) )


(de create-net ()
  (alloc_net (+ 521 0) (+ 17680 0))
  (build-net-nobias '((input 400) (hid-den 40) (output 40)) ())
  ()
  (bias-connect hid-den)
  (bias-connect output)
  (connect input hid-den)
  (connect hid-den output) )


(de draw-net (l num)
  (let ((window ()))
    (when (null draw-net-window)
      (setq draw-net-window (new-window 800 400 "Network Window")) ) )
  (let ((window draw-net-window))
    (graphics_batch
      (cls)
      (gray_draw_list 103 130 (state input) 20 1.2 -1.2 6)
      (draw_list 311 50 (state hid-den) 1 1.2 7 5)
      (draw_list 421 50 (state output) 1 1.2 7 5) ) ) )
