for a torch tensor in python I can use
y = x[i].sigmoid()
how do I replicate this using MLMultiArray in Swift ?
I can get the array by VNCoreMLFeatureValueObservation.featureValue.multiArrayValue
now I want to apply sigmoid on this
the sigmoid function I'm using is:
func sigmoid(z: Double) -> Double {
return 1.0 / (1.0 + exp(-z))
}