3 ms·
I mean TensorFlow is c++/cuda! No. When I write Tensorflow code I write Python. I don’t care what TF does under the hood just like I don’t care that Python its
by p1esk 4y ago
I mean TensorFlow is c++/cuda!
No. When I write Tensorflow code I write Python. I don’t care what TF does under the hood just like I don’t care that Python itself might be implemented in C. Though I got to say TF is quite ugly and not a good example of Python’s user friendliness. But that’s another topic.
- easytiger 4y agoAs long as you know python is doing little to no computational work.
- necovek 4y agoThat's a known and widely publicised trait of Python. In the early days, Python tutorial warned against adding to strings by doing "+" even though it works because that performed a new allocation and string copy. What you were asked to do was use fast, optimized C-based primitives like "\n".join(list_of_strings) etc. Basically, Python is an "ergonomic" language built in C. Saying how something is implemented in C at the lower level is pointless, because all of Python is. Yes, doing loops over large data sets in Python is slow. Which is why it provides itertools (again, C-based functions) in stdlib.
- gpderetta 4y agoBut as soon as you step out of the optimized path, the performance cliff is huge. Also you are forced to work in non idiomatic awkward meta-languages.