The MPS sample code for WWDC 2019 on how to train a neural network is writtien in Objective-C even when the whole talk is given with Swift. https://developer.apple.com/documentation/metalperformanceshaders/training_a_neural_network_with_metal_performance_shaders
I do not have anything against Objective-C, but is it possible to get the sample code written in Swift?