Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/train/openaccel-lab/controls/softmax_unstable/omega.om # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / train / openaccel-lab / controls / softmax_unstable / omega.om` 38 lines ยท 616 bytes Raw Blame History 1 note CONTROL softmax_unstable: the max subtraction is deliberately omitted, e = exp(x) rounded to f32 2 global kr ulong 1 3 global kd ulong 1 4 fn smrow o ulong d ulong to void 5 s = 0.0f32 6 for k ulong d 7 e = f32 oal_expf f64 get fa add o k 8 put fo add o k e 9 s = add s e 10 end 11 for k ulong d 12 put fo add o k div get fo add o k s 13 end 14 end 15 fn kern to void 16 d = get kd 0 17 for i ulong get kr 0 18 smrow mul i d d 19 end 20 end 21 fn main to int 22 oal_begin 23 put kr 0 ulong oal_p 0 24 put kd 0 ulong oal_p 1 25 a = oal_fa 0 26 w = oal_warm 27 for i ulong add w oal_reps 28 t0 = monons 29 kern 30 t1 = monons 31 if ge i w 32 oal_tick sub t1 t0 33 end 34 end 35 oal_so 0 a 36 oal_end 37 ret 0 38 end