CanadaPlus

joined 1 year ago
[–] [email protected] 2 points 9 months ago* (last edited 9 months ago) (3 children)

At the simplest, it takes in a vector of floating-point numbers, multiplies them with other similar vectors (the "weights"), sums each one, applies a RELU* the the result, and then uses those values as a vector for another layer with it's own weights (or gives output). The magic is in the weights.

This operation is a simple matrix-by-vector product followed by pairwise RELU, if you know what that means.

In Haskell, something like:

layer layerInput layerWeights = map relu $ map sum $ map (zipWith (*) layerInput) layerWeights

foldl layer modelInput modelWeights

Where modelWeights is [[[Float]]], and so layer has type [Float] -> [[Float]] -> [Float].

* RELU: if i>0 then i else 0. It could also be another nonlinear function, but RELU is obviously fast and works about as well as anything else. There's interesting theoretical work on certain really weird functions, though.


Less simple, it might have a set pattern of zero weights which can be ignored, allowing fast implementation with a bunch of smaller vectors, or have pairwise multiplication steps, like in the Transformer. Aaand that's about it, all the rest is stuff that was figured out by trail and error like encoding, and the math behind how to train the weights. Now you know.

Assuming you use hex values for 32-bit weights, you could write a line with 4 no problem:

wgt35 = [0x1234FCAB, 0x1234FCAB, 0x1234FCAB, 0x1234FCAB];

And, you can sometimes get away with half-precision floats.

[–] [email protected] 3 points 10 months ago (5 children)

Actually, I bet you could implement that in less. You should be able to legibly get several weights in one line.

[–] [email protected] 1 points 10 months ago* (last edited 10 months ago) (1 children)

Hmm, let me try this.

Counterspell

Edit: Nice! For anyone else, just copy the link from the source of the comment.

[–] [email protected] 4 points 10 months ago

Call me when defining it a second time makes it guaranteed false again.

[–] [email protected] 1 points 10 months ago* (last edited 10 months ago)

DNA is a programming language

JavaScript no longer has the worst type system, then.

Jury's out on whether brainfuck or general relativity is more tractable.

[–] [email protected] 3 points 10 months ago

Oh no, does this include all hypothetical alternate interpretations of the same code? So, you just look at the screen and go "yep, it definitely could mean something"?

[–] [email protected] 57 points 10 months ago (5 children)

Bro needs to go big. Why not all electronics and electronic systems in general? As it is he could still be "caught with his pants down" by another speculative execution bug.

[–] [email protected] 1 points 10 months ago

As far as I can tell, the doctrine of the trinity served political rather than logical purposes back when it was put in writing in late antiquity, and since then it's just been the doctrine. If you want to believe, you just have to believe and not think about it too hard, like the video says.

[–] [email protected] 2 points 10 months ago

I like the format, though.

[–] [email protected] 2 points 10 months ago

Unsafe... for our margins!

[–] [email protected] 2 points 11 months ago (2 children)

What should it be called?

[–] [email protected] 23 points 11 months ago

If they can do it, they will. It's ad dollars to them, as good as any others.

Don't let them do it. Buy dumb electronics, or at least smart electronics you can use airgapped.

view more: ‹ prev next ›