swift-apis
swift-apis copied to clipboard
Swift for TensorFlow Deep Learning Library
I'm trying to implement a simple/limited version of the `meshgrid` op. This is what I've got: ``` func meshgrid(x: Tensor, y: Tensor) -> (Tensor, Tensor) { let outputX = x.reshaped(to:...
Upon executing `swift build`, I'm receiving the following message: Any workarounds ? ``` error: found 1 file(s) which are unhandled; explicitly declare them as resources or exclude from the target...
We just need to expose and call: https://github.com/tensorflow/swift-apis/blob/e6afd0ba29570ac285241bc92bd04be896b98396/Sources/x10/xla_client/metrics.h#L156 with the name being the operation.
Currently we can't easily know how many parameters `Layer` instance has. It'll be useful for estimating model size. Keras's `Layer` has this feature. https://github.com/keras-team/keras/blob/c10d24959b0ad615a21e671b180a1b2466d77a2b/keras/engine/base_layer.py#L1105-L1123
Swift for TensorFlow should provide standard linear algebra operations from [`tf.linalg`](https://www.tensorflow.org/api_docs/python/tf/linalg)/[`np.linalg`](https://docs.scipy.org/doc/numpy-1.13.0/reference/routines.linalg.html): - [x] [`tf.linalg.band_part`](https://www.tensorflow.org/api_docs/python/tf/linalg/band_part) - Done in https://github.com/tensorflow/swift-apis/pull/571. - [x] [`tf.linalg.cholesky`](https://www.tensorflow.org/api_docs/python/tf/linalg/cholesky) - Done in https://github.com/tensorflow/swift-apis/pull/563. - [ ] [`tf.linalg.cholesky_solve`](https://www.tensorflow.org/api_docs/python/tf/linalg/cholesky_solve) -...
Just a small-ish roadmap to different Optimizers and losses we can look at to add : Optimizers:- - [x] Adam - [x] Adagrad - [x] SGD - [x] RMSprop -...
Currently I'm trying to implement custom CUDA kernel for S4TF. It seems mostly straightforward (given that C API contains TF_LibraryLoad and all other necessary stuff), but operation launching is what...
Layers currently lack derivative tests. * Tensor operation derivatives are tested in `Tests/TensorFlowTests/TensorAutoDiffTests.swift`. * Layers are tested in `Tests/TensorFlowTests/LayerTests.swift`. (#77) Consider adding layer derivative tests to `Tests/TensorFlowTests/LayerTests.swift`, alongside layer "forward-pass"...
Hello all, I have a very simple question. How to compute gradients w.r.t. a subset of parameters. Let's say I have a model like: ```swift struct Model: Layer { var...
I found strange use of `Conv2D` in its test. https://github.com/tensorflow/swift-apis/blob/3304db3e728120b55674cca06894b6ea5083b5e8/Tests/TensorFlowTests/LayerTests.swift#L101-L111 The filter has shape `[1, 2, 2, 1]` and input has shape `[2, 2, 2, 2]`. `Conv2D` has strides `(2,...