{"action":"created","comment":{"url":"https://api.github.com/repos/tensorflow/swift-models/pulls/comments/194522727","pull_request_review_id":127710766,"id":194522727,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NDUyMjcyNw==","diff_hunk":"@@ -0,0 +1,285 @@\n+// Copyright 2018 The TensorFlow Authors. All Rights Reserved.\n+//\n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+//     http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.\n+\n+\n+import Foundation\n+import TensorFlow\n+import Python\n+\n+let outputFolder = \"/tmp/mnist-test/\"\n+enum AutoencoderError: Error {\n+    case noDatasetFound\n+}\n+\n+func readDataset() throws -> (images: Tensor<Float>, labels: Tensor<Int32>) {\n+    print(\"Reading the data.\")\n+    guard let swiftFile = CommandLine.arguments.first else { throw AutoencoderError.noDatasetFound }\n+    let swiftFileURL = URL(fileURLWithPath: swiftFile)\n+    var imageFolderURL = swiftFileURL.deletingLastPathComponent()\n+    var labelFolderURL = swiftFileURL.deletingLastPathComponent()\n+    imageFolderURL.appendPathComponent(\"Resources/train-images-idx3-ubyte\")\n+    labelFolderURL.appendPathComponent(\"Resources/train-labels-idx1-ubyte\")\n+    \n+    let imageData = try Data(contentsOf: imageFolderURL).dropFirst(16)\n+    let labelData = try Data(contentsOf: labelFolderURL).dropFirst(8)\n+    let images = imageData.map { Float($0) }\n+    let labels = labelData.map { Int32($0) }\n+    let rowCount = Int32(labels.count)\n+    let columnCount = Int32(images.count) / rowCount\n+    \n+    print(\"Constructing the data tensors.\")\n+    let imagesTensor = Tensor(shape: [rowCount, columnCount], scalars: images)\n+    let labelsTensor = Tensor(labels)\n+    return (imagesTensor, labelsTensor)\n+}\n+\n+func plot(tensor: [Float], labels: Tensor<Int32>, step: Int) {\n+    // Import Python modules\n+    let matplotlib = Python.import(\"matplotlib\")\n+    // Turn off using display on server / linux\n+    matplotlib.use(\"Agg\")\n+    \n+    let np = Python.import(\"numpy\")\n+    let plt = Python.import(\"matplotlib.pyplot\")\n+    \n+    // Create figure\n+    let ax = plt.gca()\n+    // Create colors\n+    let linspace = np.linspace(start: 0, stop: 1, num: 10, endpoint: true, retstep: false)\n+    let colorMap = plt.get_cmap(\"RdBu\")\n+    let colors = np.r_[linspace, linspace]\n+    let mappedColors = colorMap(colors)\n+    for element in 0..<10 {\n+        let xElementIndex = labels.scalars.enumerated().filter { $0.element == element}.map { 2 * $0.offset + 0}\n+        let yElementIndex = labels.scalars.enumerated().filter { $0.element == element}.map { 2 * $0.offset + 1}\n+        let x = tensor.enumerated().filter { xElementIndex.contains($0.offset) }.map { $0.element }\n+        let y = tensor.enumerated().filter { yElementIndex.contains($0.offset) }.map { $0.element }\n+        ax.scatter(x: x, y: y, color: mappedColors[element], label: \"\\(element)\", s: 20, alpha: 0.8)\n+    }\n+    ax.set_xlabel(\"Autoencoder clasterization.\")\n+    ax.legend()\n+    //plt.axis.dynamicallyCall(withArguments:[-0.3, 0.3, -0.3, 0.3])\n+    if !FileManager.default.fileExists(atPath: outputFolder) {\n+        try? FileManager.default.createDirectory(atPath: outputFolder, withIntermediateDirectories: false, attributes: nil)\n+    }\n+    plt.savefig(\"\\(outputFolder)autoencoder-\\(step).png\", dpi: 300)\n+    plt.close()\n+}\n+\n+func plot(image: [Float], name: String) {\n+    // Import Python modules\n+    let matplotlib = Python.import(\"matplotlib\")\n+    // Turn off using display on server / linux\n+    matplotlib.use(\"Agg\")\n+    let np = Python.import(\"numpy\")\n+    let plt = Python.import(\"matplotlib.pyplot\")\n+    // Create figure\n+    let ax = plt.gca()\n+    // Create colors\n+    \n+    let array = np.array([image])\n+    \n+    let pixels = array.reshape([Autoencoder.imageEdge * 5, Autoencoder.imageEdge * 5])\n+    if !FileManager.default.fileExists(atPath: outputFolder) {\n+        try? FileManager.default.createDirectory(atPath: outputFolder, withIntermediateDirectories: false, attributes: nil)\n+    }\n+    ax.imshow(pixels, cmap: \"gray\")\n+    plt.savefig(\"\\(outputFolder)\\(name).png\", dpi : 300)\n+    plt.close()\n+}\n+\n+public struct Autoencoder {\n+    static let imageEdge: Int32 = 28\n+    static let imageSize: Int32 = imageEdge * imageEdge\n+    static let decoderLayerSize: Int32 = 50\n+    static let encoderLayerSize: Int32 = 50\n+    static let hiddenLayerSize: Int32 = 2\n+    \n+    var w1: Tensor<Float>\n+    var w2: Tensor<Float>\n+    var w3: Tensor<Float>\n+    var w4:Tensor<Float>\n+    \n+    var b2 = Tensor<Float>(zeros: [1, Autoencoder.hiddenLayerSize])\n+    var learningRate: Float = 0.001\n+    \n+    init() {\n+        let w1 = Tensor<Float>(randomUniform: [Autoencoder.imageSize, Autoencoder.decoderLayerSize])\n+        let w2 = Tensor<Float>(randomUniform: [Autoencoder.decoderLayerSize, Autoencoder.hiddenLayerSize])\n+        let w3 = Tensor<Float>(randomUniform: [Autoencoder.hiddenLayerSize, Autoencoder.encoderLayerSize])\n+        let w4 = Tensor<Float>(randomUniform: [Autoencoder.encoderLayerSize, Autoencoder.imageSize])\n+        \n+        // Xavier initialization\n+        self.w1 = w1 / sqrtf(Float(Autoencoder.imageSize))\n+        self.w2 = w2 / sqrtf(Float(Autoencoder.decoderLayerSize))\n+        self.w3 = w3 / sqrtf(Float(Autoencoder.hiddenLayerSize))\n+        self.w4 = w4 / sqrtf(Float(Autoencoder.encoderLayerSize))\n+    }\n+}\n+\n+public extension Autoencoder {\n+    @inline(never)\n+    func embedding(for input: Tensor<Float>) -> (tensor: Tensor<Float>, loss: Float, input: Tensor<Float>, output: Tensor<Float>) {\n+        let inputNormalized = input / 255.0\n+        \n+        // Forward pass\n+        let z1 = inputNormalized ⊗ w1\n+        let h1 = tanh(z1)\n+        let z2 = h1 ⊗ w2 + b2\n+        let h2 = z2\n+        let z3 = h2 ⊗ w3\n+        let h3 = tanh(z3)\n+        let z4 = h3 ⊗ w4\n+        let predictions = sigmoid(z4)\n+        let loss: Float = 0.5 * (predictions - inputNormalized).squared().mean()\n+        return (h2, loss, inputNormalized, predictions)\n+    }\n+    \n+    mutating func trainStep(input: Tensor<Float>) -> Float {\n+        \n+        let learningRate = self.learningRate\n+        \n+        // Batch normalization\n+        let inputNormalized = input / 255.0\n+        let batchSize = Tensor<Float>(inputNormalized.shapeTensor[0])\n+        \n+        // Forward pass\n+        let z1 = inputNormalized ⊗ w1\n+        let h1 = tanh(z1)\n+        let z2 = h1 ⊗ w2 + b2\n+        let h2 = z2\n+        let z3 = h2 ⊗ w3\n+        let h3 = tanh(z3)\n+        let z4 = h3 ⊗ w4\n+        let predictions = sigmoid(z4)\n+        \n+        // Backward pass\n+        let dz4 = ((predictions - inputNormalized) / batchSize)\n+        let dw4 = h3.transposed(withPermutations: 1, 0) ⊗ dz4\n+        \n+        let dz3 = dz4.dot(w4.transposed(withPermutations: 1, 0)) * (1 - h3.squared())\n+        let dw3 = h2.transposed(withPermutations: 1, 0) ⊗ dz3\n+        \n+        let dz2 = dz3.dot(w3.transposed(withPermutations: 1, 0))\n+        let dw2 = h1.transposed(withPermutations: 1, 0) ⊗ dz2\n+        let db2 = dz2.sum(squeezingAxes: 0)\n+        \n+        let dz1 = dz2.dot(w2.transposed(withPermutations: 1, 0)) * (1 - h1.squared())\n+        let dw1 = inputNormalized.transposed(withPermutations: 1, 0) ⊗ dz1\n+        \n+        let loss: Float = 0.5 * (predictions - inputNormalized).squared().mean()\n+        \n+        // Gradient descent.\n+        w1 -= dw1 * learningRate\n+        w2 -= dw2 * learningRate\n+        w3 -= dw3 * learningRate\n+        w4 -= dw4 * learningRate\n+        \n+        b2 -= db2 * learningRate\n+        \n+        return loss\n+    }\n+}\n+\n+public extension Autoencoder {\n+    @inline(never)\n+    mutating public func train(on dataset: (images: Tensor<Float>, labels: Tensor<Int32>)) {\n+        print(\"Train on dataset\")\n+        var iterationNumber = 0\n+        let maxIterations = 100\n+        let batchSize: Int32 = 50\n+        repeat {\n+            iterationNumber += 1\n+            for batchStep in 0..<500 {\n+                let batch = batchSize * Int32(batchStep)\n+                let images = dataset.images.slice(lowerBounds: [batch, 0], upperBounds: [batch + batchSize, Autoencoder.imageSize])\n+                let loss = trainStep(input: images)\n+                if iterationNumber % 10 == 0 && batchStep == 0 {\n+                    print(\"\\(iterationNumber) step, loss: \\(loss)\")\n+                }\n+            }\n+        } while iterationNumber < maxIterations\n+    }\n+    \n+    static func reshape(image: [Float], numberOfImagesInLine: Int) -> [Float] {\n+        var fullImage = [Float]()\n+        let imageEdge = Int(Autoencoder.imageEdge)\n+        \n+        \n+        //FIXME: Improve fors.\n+        for rowIndex in 0..<numberOfImagesInLine {","path":"Autoencoder/Autoencoder.swift","position":221,"original_position":221,"commit_id":"7f00f7a66f5f623a5a2bd8f18befa6ad577025fd","original_commit_id":"7f00f7a66f5f623a5a2bd8f18befa6ad577025fd","user":{"login":"rxwei","id":856507,"node_id":"MDQ6VXNlcjg1NjUwNw==","avatar_url":"https://avatars0.githubusercontent.com/u/856507?v=4","gravatar_id":"","url":"https://api.github.com/users/rxwei","html_url":"https://github.com/rxwei","followers_url":"https://api.github.com/users/rxwei/followers","following_url":"https://api.github.com/users/rxwei/following{/other_user}","gists_url":"https://api.github.com/users/rxwei/gists{/gist_id}","starred_url":"https://api.github.com/users/rxwei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rxwei/subscriptions","organizations_url":"https://api.github.com/users/rxwei/orgs","repos_url":"https://api.github.com/users/rxwei/repos","events_url":"https://api.github.com/users/rxwei/events{/privacy}","received_events_url":"https://api.github.com/users/rxwei/received_events","type":"User","site_admin":false},"body":"I'm pretty sure that this can be done via tensorflow ops. It's more efficient than complicated loops dealing with a swift array. You could investigate this and improve it in a separate patch.","created_at":"2018-06-11T19:38:26Z","updated_at":"2018-06-11T20:01:00Z","html_url":"https://github.com/tensorflow/swift-models/pull/8#discussion_r194522727","pull_request_url":"https://api.github.com/repos/tensorflow/swift-models/pulls/8","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/tensorflow/swift-models/pulls/comments/194522727"},"html":{"href":"https://github.com/tensorflow/swift-models/pull/8#discussion_r194522727"},"pull_request":{"href":"https://api.github.com/repos/tensorflow/swift-models/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/tensorflow/swift-models/pulls/8","id":192484558,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyNDg0NTU4","html_url":"https://github.com/tensorflow/swift-models/pull/8","diff_url":"https://github.com/tensorflow/swift-models/pull/8.diff","patch_url":"https://github.com/tensorflow/swift-models/pull/8.patch","issue_url":"https://api.github.com/repos/tensorflow/swift-models/issues/8","number":8,"state":"open","locked":false,"title":"Add simple Autoencoder model. Using new `dynamicallyCall` API","user":{"login":"VolodymyrPavliukevych","id":1786378,"node_id":"MDQ6VXNlcjE3ODYzNzg=","avatar_url":"https://avatars1.githubusercontent.com/u/1786378?v=4","gravatar_id":"","url":"https://api.github.com/users/VolodymyrPavliukevych","html_url":"https://github.com/VolodymyrPavliukevych","followers_url":"https://api.github.com/users/VolodymyrPavliukevych/followers","following_url":"https://api.github.com/users/VolodymyrPavliukevych/following{/other_user}","gists_url":"https://api.github.com/users/VolodymyrPavliukevych/gists{/gist_id}","starred_url":"https://api.github.com/users/VolodymyrPavliukevych/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VolodymyrPavliukevych/subscriptions","organizations_url":"https://api.github.com/users/VolodymyrPavliukevych/orgs","repos_url":"https://api.github.com/users/VolodymyrPavliukevych/repos","events_url":"https://api.github.com/users/VolodymyrPavliukevych/events{/privacy}","received_events_url":"https://api.github.com/users/VolodymyrPavliukevych/received_events","type":"User","site_admin":false},"body":"Added simple model to illustrate base features of dynamicallyCall.","created_at":"2018-06-04T18:00:34Z","updated_at":"2018-06-11T20:01:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"050c459ce72bfdc6496d942ffe6f86ac549ec7b5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/tensorflow/swift-models/pulls/8/commits","review_comments_url":"https://api.github.com/repos/tensorflow/swift-models/pulls/8/comments","review_comment_url":"https://api.github.com/repos/tensorflow/swift-models/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tensorflow/swift-models/issues/8/comments","statuses_url":"https://api.github.com/repos/tensorflow/swift-models/statuses/7f00f7a66f5f623a5a2bd8f18befa6ad577025fd","head":{"label":"VolodymyrPavliukevych:master","ref":"master","sha":"7f00f7a66f5f623a5a2bd8f18befa6ad577025fd","user":{"login":"VolodymyrPavliukevych","id":1786378,"node_id":"MDQ6VXNlcjE3ODYzNzg=","avatar_url":"https://avatars1.githubusercontent.com/u/1786378?v=4","gravatar_id":"","url":"https://api.github.com/users/VolodymyrPavliukevych","html_url":"https://github.com/VolodymyrPavliukevych","followers_url":"https://api.github.com/users/VolodymyrPavliukevych/followers","following_url":"https://api.github.com/users/VolodymyrPavliukevych/following{/other_user}","gists_url":"https://api.github.com/users/VolodymyrPavliukevych/gists{/gist_id}","starred_url":"https://api.github.com/users/VolodymyrPavliukevych/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VolodymyrPavliukevych/subscriptions","organizations_url":"https://api.github.com/users/VolodymyrPavliukevych/orgs","repos_url":"https://api.github.com/users/VolodymyrPavliukevych/repos","events_url":"https://api.github.com/users/VolodymyrPavliukevych/events{/privacy}","received_events_url":"https://api.github.com/users/VolodymyrPavliukevych/received_events","type":"User","site_admin":false},"repo":{"id":136062771,"node_id":"MDEwOlJlcG9zaXRvcnkxMzYwNjI3NzE=","name":"swift-models","full_name":"VolodymyrPavliukevych/swift-models","owner":{"login":"VolodymyrPavliukevych","id":1786378,"node_id":"MDQ6VXNlcjE3ODYzNzg=","avatar_url":"https://avatars1.githubusercontent.com/u/1786378?v=4","gravatar_id":"","url":"https://api.github.com/users/VolodymyrPavliukevych","html_url":"https://github.com/VolodymyrPavliukevych","followers_url":"https://api.github.com/users/VolodymyrPavliukevych/followers","following_url":"https://api.github.com/users/VolodymyrPavliukevych/following{/other_user}","gists_url":"https://api.github.com/users/VolodymyrPavliukevych/gists{/gist_id}","starred_url":"https://api.github.com/users/VolodymyrPavliukevych/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VolodymyrPavliukevych/subscriptions","organizations_url":"https://api.github.com/users/VolodymyrPavliukevych/orgs","repos_url":"https://api.github.com/users/VolodymyrPavliukevych/repos","events_url":"https://api.github.com/users/VolodymyrPavliukevych/events{/privacy}","received_events_url":"https://api.github.com/users/VolodymyrPavliukevych/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/VolodymyrPavliukevych/swift-models","description":"Example models built using Swift for TensorFlow","fork":true,"url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models","forks_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/forks","keys_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/keys{/key_id}","collaborators_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/teams","hooks_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/hooks","issue_events_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/issues/events{/number}","events_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/events","assignees_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/assignees{/user}","branches_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/branches{/branch}","tags_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/tags","blobs_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/git/refs{/sha}","trees_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/git/trees{/sha}","statuses_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/statuses/{sha}","languages_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/languages","stargazers_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/stargazers","contributors_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/contributors","subscribers_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/subscribers","subscription_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/subscription","commits_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/commits{/sha}","git_commits_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/git/commits{/sha}","comments_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/comments{/number}","issue_comment_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/issues/comments{/number}","contents_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/contents/{+path}","compare_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/compare/{base}...{head}","merges_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/merges","archive_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/downloads","issues_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/issues{/number}","pulls_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/pulls{/number}","milestones_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/milestones{/number}","notifications_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/labels{/name}","releases_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/releases{/id}","deployments_url":"https://api.github.com/repos/VolodymyrPavliukevych/swift-models/deployments","created_at":"2018-06-04T17:52:52Z","updated_at":"2018-06-10T13:31:49Z","pushed_at":"2018-06-09T20:39:42Z","git_url":"git://github.com/VolodymyrPavliukevych/swift-models.git","ssh_url":"git@github.com:VolodymyrPavliukevych/swift-models.git","clone_url":"https://github.com/VolodymyrPavliukevych/swift-models.git","svn_url":"https://github.com/VolodymyrPavliukevych/swift-models","homepage":"","size":14456,"stargazers_count":1,"watchers_count":1,"language":"Swift","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"tensorflow:master","ref":"master","sha":"e484b4aaf8f7d2d09f27ea30b82b318672e74e44","user":{"login":"tensorflow","id":15658638,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1NjU4NjM4","avatar_url":"https://avatars1.githubusercontent.com/u/15658638?v=4","gravatar_id":"","url":"https://api.github.com/users/tensorflow","html_url":"https://github.com/tensorflow","followers_url":"https://api.github.com/users/tensorflow/followers","following_url":"https://api.github.com/users/tensorflow/following{/other_user}","gists_url":"https://api.github.com/users/tensorflow/gists{/gist_id}","starred_url":"https://api.github.com/users/tensorflow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tensorflow/subscriptions","organizations_url":"https://api.github.com/users/tensorflow/orgs","repos_url":"https://api.github.com/users/tensorflow/repos","events_url":"https://api.github.com/users/tensorflow/events{/privacy}","received_events_url":"https://api.github.com/users/tensorflow/received_events","type":"Organization","site_admin":false},"repo":{"id":130903312,"node_id":"MDEwOlJlcG9zaXRvcnkxMzA5MDMzMTI=","name":"swift-models","full_name":"tensorflow/swift-models","owner":{"login":"tensorflow","id":15658638,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1NjU4NjM4","avatar_url":"https://avatars1.githubusercontent.com/u/15658638?v=4","gravatar_id":"","url":"https://api.github.com/users/tensorflow","html_url":"https://github.com/tensorflow","followers_url":"https://api.github.com/users/tensorflow/followers","following_url":"https://api.github.com/users/tensorflow/following{/other_user}","gists_url":"https://api.github.com/users/tensorflow/gists{/gist_id}","starred_url":"https://api.github.com/users/tensorflow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tensorflow/subscriptions","organizations_url":"https://api.github.com/users/tensorflow/orgs","repos_url":"https://api.github.com/users/tensorflow/repos","events_url":"https://api.github.com/users/tensorflow/events{/privacy}","received_events_url":"https://api.github.com/users/tensorflow/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tensorflow/swift-models","description":"Example models built using Swift for TensorFlow","fork":false,"url":"https://api.github.com/repos/tensorflow/swift-models","forks_url":"https://api.github.com/repos/tensorflow/swift-models/forks","keys_url":"https://api.github.com/repos/tensorflow/swift-models/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tensorflow/swift-models/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tensorflow/swift-models/teams","hooks_url":"https://api.github.com/repos/tensorflow/swift-models/hooks","issue_events_url":"https://api.github.com/repos/tensorflow/swift-models/issues/events{/number}","events_url":"https://api.github.com/repos/tensorflow/swift-models/events","assignees_url":"https://api.github.com/repos/tensorflow/swift-models/assignees{/user}","branches_url":"https://api.github.com/repos/tensorflow/swift-models/branches{/branch}","tags_url":"https://api.github.com/repos/tensorflow/swift-models/tags","blobs_url":"https://api.github.com/repos/tensorflow/swift-models/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tensorflow/swift-models/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tensorflow/swift-models/git/refs{/sha}","trees_url":"https://api.github.com/repos/tensorflow/swift-models/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tensorflow/swift-models/statuses/{sha}","languages_url":"https://api.github.com/repos/tensorflow/swift-models/languages","stargazers_url":"https://api.github.com/repos/tensorflow/swift-models/stargazers","contributors_url":"https://api.github.com/repos/tensorflow/swift-models/contributors","subscribers_url":"https://api.github.com/repos/tensorflow/swift-models/subscribers","subscription_url":"https://api.github.com/repos/tensorflow/swift-models/subscription","commits_url":"https://api.github.com/repos/tensorflow/swift-models/commits{/sha}","git_commits_url":"https://api.github.com/repos/tensorflow/swift-models/git/commits{/sha}","comments_url":"https://api.github.com/repos/tensorflow/swift-models/comments{/number}","issue_comment_url":"https://api.github.com/repos/tensorflow/swift-models/issues/comments{/number}","contents_url":"https://api.github.com/repos/tensorflow/swift-models/contents/{+path}","compare_url":"https://api.github.com/repos/tensorflow/swift-models/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tensorflow/swift-models/merges","archive_url":"https://api.github.com/repos/tensorflow/swift-models/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tensorflow/swift-models/downloads","issues_url":"https://api.github.com/repos/tensorflow/swift-models/issues{/number}","pulls_url":"https://api.github.com/repos/tensorflow/swift-models/pulls{/number}","milestones_url":"https://api.github.com/repos/tensorflow/swift-models/milestones{/number}","notifications_url":"https://api.github.com/repos/tensorflow/swift-models/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tensorflow/swift-models/labels{/name}","releases_url":"https://api.github.com/repos/tensorflow/swift-models/releases{/id}","deployments_url":"https://api.github.com/repos/tensorflow/swift-models/deployments","created_at":"2018-04-24T19:21:41Z","updated_at":"2018-06-10T15:12:43Z","pushed_at":"2018-06-09T20:39:43Z","git_url":"git://github.com/tensorflow/swift-models.git","ssh_url":"git@github.com:tensorflow/swift-models.git","clone_url":"https://github.com/tensorflow/swift-models.git","svn_url":"https://github.com/tensorflow/swift-models","homepage":"","size":9677,"stargazers_count":127,"watchers_count":127,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":14,"open_issues":7,"watchers":127,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tensorflow/swift-models/pulls/8"},"html":{"href":"https://github.com/tensorflow/swift-models/pull/8"},"issue":{"href":"https://api.github.com/repos/tensorflow/swift-models/issues/8"},"comments":{"href":"https://api.github.com/repos/tensorflow/swift-models/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/tensorflow/swift-models/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/tensorflow/swift-models/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tensorflow/swift-models/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/tensorflow/swift-models/statuses/7f00f7a66f5f623a5a2bd8f18befa6ad577025fd"}},"author_association":"NONE"}}
{"actor":{"display_login":"rxwei"}}