AI-powered
podcast player
Listen to all your favourite podcasts with AI-powered features
Is Swift Better for Machine Learning Than Python?
Swift is closer as we said before to a camel and to something functional. Swift actually uses reference counting rather than a GC. That's turned out to be pretty important because when you're training a big machine learning model, one of the challenges is to freeze the memory as soon as possible. PyTorch lets you annotate Python functions with just in time information that tells PyTorch framework to try to compile the function and compile it backward pass from the syntax tree.