Debug in Swift for Tensorflow

46 views
Skip to first unread message

Tony Yang

unread,
May 2, 2018, 7:45:38 PM5/2/18
to Swift for TensorFlow
Hi Swift for TF developers, thanks for providing this new define-by-run approach.

I am wondering what would debug looks like in Swift for Tensorflow.

Say we have
```
let x = #tfop("SomeOp", values)
let y = #tfop("AnotherOp", x)
values = #tfop("MixOp", result, y)
```

Am I able to execute the code line by line, look around and print out the tensor value?

Mingsheng Hong

unread,
May 2, 2018, 8:22:53 PM5/2/18
to Tony Yang, Swift for TensorFlow
Hi Tony,

Some options I can think of are:

1. REPL/playground debugging, where you type in one statement at a time, and it should show the result.

2. print debugging, as in:

let x = #tfop("SomeOp", values)
print(x)
let y = #tfop("AnotherOp", x)
print(y)

#2 will be feasible once we have sends/receives support.

3. Let Swift compiler dump the TF graph, and run the graph with TensorFlow tools like TensorBoard for debugging.

We could also look into lldb extension for tensor debugging, though the design and priority of that is not yet clear. Is anyone from the community interested in looking into it? :-)

--
You received this message because you are subscribed to the Google Groups "Swift for TensorFlow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swift+un...@tensorflow.org.
Reply all
Reply to author
Forward
0 new messages