3 ms·
What does the`.0` calling convention mean in Rust? e.g. ``` for (i, r) in right.0.iter().enumerate() { out.0[i] += r; } ``` Aside f
by ShamelessC 5y ago
What does the`.0` calling convention mean in Rust? e.g.
```
for (i, r) in right.0.iter().enumerate() {
out.0[i] += r;
}
```
Aside from that, I thought it was fairly legible. Great write-up by the way. Squashing things into state helps get rid of some of the spookiness created by matrix multiplication and back-propagation. I also really appreciated seeing the explanation on the actual MLP part of the transformer as that is typically assumed to be prior knowledge in other tutorials.
- heinrichf 5y agoIt's to access the tuple's single element, but the author could have used #[repr(transparent)]