Avatar
@swift-tensorflow import TensorFlow func cube<T : FloatingPoint>(_ x: T, _ str: String) -> T { print(str) return x * x * x } let dCube_dx = #gradient(of: cube, withRespectTo: .0) let _ = cube(5, "hi") let _ = dCube_dx(5, "hi")