swift-apis
swift-apis copied to clipboard
Swift for TensorFlow Deep Learning Library
The design of [`Recurrent` layer types](https://github.com/tensorflow/swift-apis/blob/master/Sources/TensorFlow/Layers/Recurrent.swift) is unique, but it should still be possible to add annotations. Tackling this separately from #1067, but the principle should be similar.
`+=`, `-=`, `*=` in https://github.com/tensorflow/swift-apis/blob/master/Sources/TensorFlow/Operators/Math.swift are not differentiable, but it should be pretty straightforward to make them differentiable.
[Model summary formatting](https://github.com/tensorflow/swift-apis/blob/master/Sources/TensorFlow/Layer.swift#L95-L147) is rudimentary and could be improved so that tabs align. Potentially use some ideas from [swift-benchmark](https://github.com/google/swift-benchmark).
As part of integrating Deep Q-Networks in [swift-models PR #617](https://github.com/tensorflow/swift-models/pull/617), the `Raw.gatherNd()` operator was needed. No extension to Tensor implemented this, so a `dimensionGathering()` function on Tensor was added [here](https://github.com/tensorflow/swift-models/blob/master/Gym/DQN/Gathering.swift)....
This code crashes without output in Colab (s4tf v0.10) though it compiles and runs locally on macOS: import TensorFlow public struct Network: Layer { var blocks: [Conv2D] = [] public...
Add a `SequentialComposition` layer wrapper type. `SequentialComposition` is a `Layer` that wraps a collection, applying each element in sequence to an input to produce an output. The `callAsFunction` method calls...
Some simple image classification models can trigger a segfault when using the XLA device specifically on macOS. For now, we're explicitly having them use the eager-mode device instead until this...
We probably don't need these anymore: Remove dependency on TFE_InferShapes and TFE_GetServerDef.
all credit to @s1ddok for reporting this in https://github.com/tensorflow/swift-models/pull/394! something is failing (i think block-based reduces) with the adamax/AMSGrad optimizers: [edit: updated 2020-05-17 to match latest swift-models api changes, still...
Hello, using the following code on Ubuntu 18.04: ``` public struct MLP: Layer { public typealias Input = Tensor public typealias Output = Tensor var denseLayers = [Dense]() init(inputSize: Int,...