Last active
July 24, 2019 03:59
-
-
Save saeta/5eb757a598b9f74616b0e5a8d87c6d84 to your computer and use it in GitHub Desktop.
Brennan's TOP SECRET Demo Notes - TFDevSummit 19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var w, b1, b2: Tensor<Float> | |
init(inputSize: Int, outputSize: Int) { | |
// Slightly buggy! | |
w = Tensor<Float>(zeros: [inputSize, outputSize]) | |
b1 = Tensor<Float>(zeros: [outputSize]) | |
b2 = Tensor<Float>(zeros: [outputSize]) | |
} | |
@differentiable | |
func callAsFunction(_ input: Tensor<Float>) -> Tensor<Float> { | |
return matmul(input, w) + b1 + b2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See the rest of the demos at: https://github.com/saeta/s4tf-dev-summit-19