Lesson 14 (2019) discussion and wiki

Well The course is of course over however good thing is we still have one more bonus class. It will be nice to seeing Jeremy and Rachel teaching again very soon…!!!

3 Likes

In case anybody else also found the "so we simply define a new compose operator >| " part very inspiring and thought “Can we do that in python, too?”, the short answer is “No!”, not without modifying the underlying CPython interpreter (so, point goes to Swift where anything is hackable :wink: ).

But - as Jeremy has shown before - overloading/redefining existing special dunder methods of objects is very easy, so redefining the pipe operator would be quite easy (| in python is “or” = .__or__(self, other), “bitwise or” = .__ror__(self, other)).
In order to avoid possible conflicts with existing uses of “or” in the code and for readability/clarity it might be better to use something rarely used like the shift operator (>> which is .__rshift__(self , other)).

Ideas from here:

3 Likes

I don’t watch TV or play computer games or get lost in social media so I maximize the time I spend on things I care about. So over time I’ve gotten faster at doing stuff, since I’ve been practicing and learning lots.

12 Likes

That’s an excellent thread, thanks for sharing!

That said, I do want to point out that each of us is in a different situation and faces different challenges. When I say I’ll need 6 years, I’m factoring all that in! Earlier I would compare and feel overwhelmed or disheartened. But nowadays I go read @radek’s tweet thread and remind myself to “keep walking”. :slight_smile:

5 Likes

Well, most of normal human beings (non Jeremy like :slight_smile: ) will go through these feelings. I can personally relate to them as I was so overwhelmed after part 2 last year that I gave up even during the middle of the course. I forgot that I must target being a little better today than what I was yesterday. I was probably wanting to compete with the pace of the course without being ready for it. But I persisted with the course this year both from Part 1 and Part 2. I also got involved in communities like Twimlai that helped a lot. Long story short, I am much more comfortable with the course and library than I was a year back. And now I feel challenged but not overwhelmed. Hopefully in a year from now, I will be much more at ease with Swift4Tensorflow as well.

9 Likes

In the notebook 02c_autodiff Step 6 should valueWithDeriv be valueWithPullback as in https://github.com/tensorflow/swift/blob/master/docs/DifferentiableFunctions.md?

This should be easily solvable using an IDE, where you click on the respective function to know its source. In jupyter notebook something like ??function name may work, I have not tried it though.

Here’s Chris Lattner talking to Lex Fridman. S4TF is mentioned from 51:36, especially 54:17 to 57:40 - TF as a compiler with Swift as a front-end language to which we can add language features

Video : https://www.youtube.com/watch?v=yCd3CzGSte8
Audio : https://lexfridman.com/chris-lattner

6 Likes

I think Chris mentioned it in the last lesson and not the 1st Swift class:

MLIR is like TensorFlow’s XLA - it tackles graph-level optimizations in TF, expands XLA beyond dense linear algebra. Currently we’re enjoying S4TF with XLA but the MLIR project is gonna make it more awesome.

It has been open sourced and you can join SIG MLIR which design meetings with the community:

https://groups.google.com/a/tensorflow.org/forum/#!topic/mlir/vj34VmkyTic