Dan Zheng

Results 38 issues of Dan Zheng

Preconditions (for shape-checking, valid value ranges, etc) would be valuable for better source locations in error messages and to avoid uninformative TensorFlow runtime errors. Example: `matmul(_:_:)` currently crashes with an...

good first issue

Compilation time (`swift build`) is very slow: ```console $ time swift build # clean build [61/61] Linking libTensorFlow.dylib swift build 506.63s user 5.63s system 253% cpu 3:22.07 total $ echo...

help wanted

Currently, `tensorflow/swift-apis` is cloned as an `apple/swift` build product and is built as part of the Swift standard library. ([relevant CMake support](https://github.com/apple/swift/blob/tensorflow/stdlib/public/TensorFlow/CMakeLists.txt)) However, we would like to move `TensorFlow` out...

[The design of `withBackend` is explained here.](https://github.com/feiwang3311/Lantern/issues/8#issuecomment-426563742) Non-nested invocations `withBackend` should work as expected. (Test `matrix-matrix-dot-with-backend` added in this PR is verified to work on GPU.) Nested invocations of `withBackend`...

postponed

A big list of clean up opportunities, vaguely ordered by importance. Feel free to add/edit. - [ ] Revamp tensor initializers, especially ones that take both "data" and "shape" arguments....

help wanted
good first issue
cleanup

Implement basic, non-strided indexing as described [here](https://github.com/feiwang3311/Lantern/commit/53fa930bb697c9e0617c905c17ef91bafd92e2da#r30776349). - [ ] Element tensor indexing: `tensor(i)`. - This returns an element tensor, whose shape is `tensor.shape.tail`. - [ ] Subtensor indexing (i.e....

feature
help wanted

Mathematically, scalars are 0-dimensional tensors. However, 0-dimensional tensors are [currently disallowed](https://github.com/feiwang3311/Lantern/blob/1bd2130fc0fbd08c68fb59b83eb9ea09915a3476/src/main/scala/lantern/ad_lms_vector.scala#L261): ```scala class Tensor(val data: Rep[Array[Float]], val dimensions: NSeq[Int]) extends Serializable { val strides = (dimensions :\ NSeq[Int]()) { case...

feature
help wanted

Previously, `Optional.TangentVector.zero` returned `.init(Wrapped.TangentVector.zero)`. Now, it returns `.init(nil)`, which is more efficient. `Optional.TangentVector` still upholds the `AdditiveArithmetic` monoid laws, e.g. `x + .zero = x`. --- Example: ```swift import _Differentiation...

Currently, `TabbedContent` always have wrap-around behavior. `left` and `right` key presses can switch the active tab from the first one to the last one and vice versa. However, this is...

1. Copybara does not merge or close pull requests upon importing commits to `dev` branch. This makes it unclear when pull requests have truly been "merged" and requires us to...

automation