Y
Hacker News
new
|
ask
|
show
|
jobs
by
akhilcacharya
2524 days ago
They built in Python interop so that you can use numpy in TFSwift
3 comments
jjoonathan
2524 days ago
Bridges
always
have trolls under them.
If you don't see the troll, that doesn't mean it isn't there, it's just waiting for you to cross.
link
jefft255
2524 days ago
Doesn’t that introduce serious overhead compared to first class native arrays as in Julia or FORTRAN?
link
superlopuh
2524 days ago
My impression is that this is to bootstrap adoption, there is a Swift-native TensorFlow package being developed also.
link
tel
2524 days ago
Bridging into NumPy isn’t going to be useful unless it covers some AD system too (XLA?).
link
shoyer
2524 days ago
XLA is a compiler for array code. It doesn't come with AD -- you need a wrapper like TF or JAX (or Swift, I guess) for that.
link
tel
2523 days ago
I was imagining the FFI emitting XLA code needed to implement the TF/JAX routines behind the scenes, but it's wild speculation.
link
StefanKarpinski
2524 days ago
Correct: you can call Python from Swift OR you can use AD but not both at the same time.
link
If you don't see the troll, that doesn't mean it isn't there, it's just waiting for you to cross.