HN user

lbatista

18 karma
Posts1
Comments14
View on HN

Thanks for pointing the missing glyph. I will paste the correct code.

  backbias←{+/,⍵}
  logistic←{÷1+*-⍵}
  maxpos←{(,⍵)⍳⌈/,⍵}
  backavgpool←{2⌿2/⍵÷4}⍤2
  meansqerr←{÷∘2+/,(⍺-⍵)*2}
  avgpool←{÷∘4{+/,⍵}⌺(2 2⍴2)⍤2⊢⍵}
  conv←{s←1+(⍴⍵)-⍴⍺⋄⊃+/,⍺×(⍳⍴⍺){s↑⍺↓⍵}¨⊂⍵}
  backin←{(d w in)←⍵⋄⊃+/,w{(⍴in)↑(-⍵+⍴d)↑⍺×d}¨⍳⍴w}
  multiconv←{(a ws bs)←⍵⋄bs{⍺+⍵ conv a}⍤(0,(⍴⍴a))⊢ws}

Convolutional Neural Networks in APL

  blog←{⍺×⍵×1-⍵}
  backbias←{+/,⍵}
  logistic←{÷1+*-⍵}
  maxpos←{(,⍵)⍳⌈/,⍵}
  backavgpool←{2⌿2/⍵÷4}⍤2
  meansqerr←{÷∘2+/,(⍺-⍵)*2}
  avgpool←{÷∘4{+/,⍵}⌺(2 2⍴2)⍤2⊢⍵}
  conv←{s←1+(⍴⍵)-⍴⍺⋄⊃+/,⍺×(⍳⍴⍺){s↑⍺↓⍵}  ⊂⍵}
  backin←{(d w in)←⍵⋄⊃+/,w{(⍴in)↑(-⍵+⍴d)↑⍺×d}  ⍳⍴w}
  multiconv←{(a ws bs)←⍵⋄bs{⍺+⍵ conv a}⍤(0,(⍴⍴a))⊢ws}
https://dl.acm.org/doi/pdf/10.1145/3315454.3329960